@Only-api
@Post
@Get
@Delete
@Observation
Feature: Observation Diagnosis resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific Observation node. This resource is part of the Diagnosis.
File name: xad.feature
Relative path: api/xad.feature
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:06.946 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "43",
"display": "(b) Hepatic carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:07.956 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:07.956 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TRR95qB15g3Lcj0N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14148/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14148/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:07.956 [print] {
"resourceType": "Observation",
"id": "14148",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:12.627+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "43",
"display": "(b) Hepatic carcinomas"
}
]
}
}
> *
print COOKIES
09:46:07.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:07.956 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:07.956 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TRR95qB15g3Lcj0N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14148/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14148/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:07.956 [print] {
"resourceType": "Observation",
"id": "14148",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:12.627+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "43",
"display": "(b) Hepatic carcinomas"
}
]
}
}
> *
print COOKIES
09:46:07.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:08.584 [print] {
"resourceType": "Observation",
"id": "14148",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:12.627+02:00",
"source": "#TRR95qB15g3Lcj0N",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "43",
"display": "(b) Hepatic carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:09.203 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:10.834 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:13.874+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:13.874+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:10.835 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "55",
"display": "(b.1) Fibroblastic and myofibroblastic tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:11.449 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:11.449 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wcKk0R9aCCr89X9F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14149/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14149/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:11.449 [print] {
"resourceType": "Observation",
"id": "14149",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:16.110+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "55",
"display": "(b.1) Fibroblastic and myofibroblastic tumors"
}
]
}
}
> *
print COOKIES
09:46:11.449 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:11.449 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:11.449 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wcKk0R9aCCr89X9F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14149/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14149/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:11.449 [print] {
"resourceType": "Observation",
"id": "14149",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:16.110+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "55",
"display": "(b.1) Fibroblastic and myofibroblastic tumors"
}
]
}
}
> *
print COOKIES
09:46:11.449 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:13.036 [print] {
"resourceType": "Observation",
"id": "14149",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:16.110+02:00",
"source": "#wcKk0R9aCCr89X9F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "55",
"display": "(b.1) Fibroblastic and myofibroblastic tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:15.326 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:15.952 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:19.990+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:19.990+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:15.952 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:16.797 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:16.797 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cCNFAg2NJKlU38yp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14150/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14150/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:16.797 [print] {
"resourceType": "Observation",
"id": "14150",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:21.454+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
> *
print COOKIES
09:46:16.797 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:16.799 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:16.799 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cCNFAg2NJKlU38yp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14150/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14150/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:16.799 [print] {
"resourceType": "Observation",
"id": "14150",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:21.454+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
> *
print COOKIES
09:46:16.799 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:17.393 [print] {
"resourceType": "Observation",
"id": "14150",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:21.454+02:00",
"source": "#cCNFAg2NJKlU38yp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:17.972 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:18.621 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:22.650+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:22.650+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:18.621 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:19.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:19.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2LX3jRVSoOaPADba"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14151/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14151/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:19.307 [print] {
"resourceType": "Observation",
"id": "14151",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:23.973+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
> *
print COOKIES
09:46:19.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:19.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:19.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2LX3jRVSoOaPADba"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14151/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14151/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:19.307 [print] {
"resourceType": "Observation",
"id": "14151",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:23.973+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
> *
print COOKIES
09:46:19.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:19.923 [print] {
"resourceType": "Observation",
"id": "14151",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:23.973+02:00",
"source": "#2LX3jRVSoOaPADba",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:21.755 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:23.378 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:26.214+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:26.214+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:23.380 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:25.040 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:25.040 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8ZyhQNMC3TQbRd4m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14152/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14152/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:25.040 [print] {
"resourceType": "Observation",
"id": "14152",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:29.685+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
> *
print COOKIES
09:46:25.040 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:25.042 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:25.042 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8ZyhQNMC3TQbRd4m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14152/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14152/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:25.042 [print] {
"resourceType": "Observation",
"id": "14152",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:29.685+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
> *
print COOKIES
09:46:25.042 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:25.605 [print] {
"resourceType": "Observation",
"id": "14152",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:29.685+02:00",
"source": "#8ZyhQNMC3TQbRd4m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:26.449 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:27.582 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:31.107+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:31.107+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:27.583 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "108",
"display": "(a.1) Gastrointestinal stromal tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:28.183 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:28.183 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JCSJdAxDCXkdV8vC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14153/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14153/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:28.183 [print] {
"resourceType": "Observation",
"id": "14153",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:32.837+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "108",
"display": "(a.1) Gastrointestinal stromal tumor"
}
]
}
}
> *
print COOKIES
09:46:28.183 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:28.185 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:28.185 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JCSJdAxDCXkdV8vC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14153/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14153/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:28.185 [print] {
"resourceType": "Observation",
"id": "14153",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:32.837+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "108",
"display": "(a.1) Gastrointestinal stromal tumor"
}
]
}
}
> *
print COOKIES
09:46:28.185 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:29.041 [print] {
"resourceType": "Observation",
"id": "14153",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:32.837+02:00",
"source": "#JCSJdAxDCXkdV8vC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "108",
"display": "(a.1) Gastrointestinal stromal tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:29.688 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:30.277 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:34.358+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:34.358+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:30.277 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:31.084 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:31.084 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rTcB3texlnzg4KVO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14154/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14154/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:31.084 [print] {
"resourceType": "Observation",
"id": "14154",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:35.755+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
> *
print COOKIES
09:46:31.084 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:31.084 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:31.084 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rTcB3texlnzg4KVO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14154/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14154/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:31.084 [print] {
"resourceType": "Observation",
"id": "14154",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:35.755+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
> *
print COOKIES
09:46:31.084 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:31.709 [print] {
"resourceType": "Observation",
"id": "14154",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:35.755+02:00",
"source": "#rTcB3texlnzg4KVO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:32.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:32.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:37.034+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:37.034+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:32.938 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:33.738 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:33.738 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HdWZqGD29WT7vR7L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14155/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14155/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:33.738 [print] {
"resourceType": "Observation",
"id": "14155",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:38.401+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
> *
print COOKIES
09:46:33.738 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:33.740 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:33.740 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HdWZqGD29WT7vR7L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14155/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14155/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:33.740 [print] {
"resourceType": "Observation",
"id": "14155",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:38.401+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
> *
print COOKIES
09:46:33.740 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:34.622 [print] {
"resourceType": "Observation",
"id": "14155",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:38.401+02:00",
"source": "#HdWZqGD29WT7vR7L",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:35.206 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:35.792 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:39.886+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:39.886+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:35.792 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:36.416 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:36.416 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OIOOrb4C64fH9WNm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14156/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14156/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:36.416 [print] {
"resourceType": "Observation",
"id": "14156",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:41.090+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
> *
print COOKIES
09:46:36.416 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:36.432 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:36.432 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OIOOrb4C64fH9WNm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14156/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14156/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:36.432 [print] {
"resourceType": "Observation",
"id": "14156",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:41.090+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
> *
print COOKIES
09:46:36.432 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:37.052 [print] {
"resourceType": "Observation",
"id": "14156",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:41.090+02:00",
"source": "#OIOOrb4C64fH9WNm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:37.657 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:38.247 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:42.326+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:42.326+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:38.247 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:38.889 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:38.889 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KWra6O57STUftaQY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14157/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14157/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:38.889 [print] {
"resourceType": "Observation",
"id": "14157",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:43.560+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
> *
print COOKIES
09:46:38.889 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:38.889 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:38.889 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KWra6O57STUftaQY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14157/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14157/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:38.889 [print] {
"resourceType": "Observation",
"id": "14157",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:43.560+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
> *
print COOKIES
09:46:38.889 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:39.769 [print] {
"resourceType": "Observation",
"id": "14157",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:43.560+02:00",
"source": "#KWra6O57STUftaQY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:40.379 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:40.982 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:45.043+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:45.043+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:40.984 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:41.582 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:41.582 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IeNjqRWg3Bl6v0Dp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14158/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14158/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:41.582 [print] {
"resourceType": "Observation",
"id": "14158",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:46.240+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
> *
print COOKIES
09:46:41.582 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:41.584 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:41.584 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IeNjqRWg3Bl6v0Dp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14158/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14158/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:41.584 [print] {
"resourceType": "Observation",
"id": "14158",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:46.240+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
> *
print COOKIES
09:46:41.584 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:42.202 [print] {
"resourceType": "Observation",
"id": "14158",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:46.240+02:00",
"source": "#IeNjqRWg3Bl6v0Dp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:42.855 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:43.442 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:47.523+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:47.523+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:43.442 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "47",
"display": "(c.1) Ewing tumor and Askin tumor of bone"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:44.265 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:44.265 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v9qE5eu9CHuGTdGm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14159/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14159/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:44.265 [print] {
"resourceType": "Observation",
"id": "14159",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:48.735+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "47",
"display": "(c.1) Ewing tumor and Askin tumor of bone"
}
]
}
}
> *
print COOKIES
09:46:44.265 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:44.265 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:44.265 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v9qE5eu9CHuGTdGm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14159/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14159/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:44.265 [print] {
"resourceType": "Observation",
"id": "14159",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:48.735+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "47",
"display": "(c.1) Ewing tumor and Askin tumor of bone"
}
]
}
}
> *
print COOKIES
09:46:44.265 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:44.871 [print] {
"resourceType": "Observation",
"id": "14159",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:48.735+02:00",
"source": "#v9qE5eu9CHuGTdGm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "47",
"display": "(c.1) Ewing tumor and Askin tumor of bone"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:45.772 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:46.381 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:50.449+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:50.449+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:46.381 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "59",
"display": "(d.1) Ewing tumor and Askin tumor of soft tissue"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:47.020 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:47.020 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9uqw3QQMYEjccjAV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14160/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14160/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:47.020 [print] {
"resourceType": "Observation",
"id": "14160",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:51.668+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "59",
"display": "(d.1) Ewing tumor and Askin tumor of soft tissue"
}
]
}
}
> *
print COOKIES
09:46:47.020 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:47.022 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:47.022 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9uqw3QQMYEjccjAV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14160/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14160/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:47.022 [print] {
"resourceType": "Observation",
"id": "14160",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:51.668+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "59",
"display": "(d.1) Ewing tumor and Askin tumor of soft tissue"
}
]
}
}
> *
print COOKIES
09:46:47.022 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:47.612 [print] {
"resourceType": "Observation",
"id": "14160",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:51.668+02:00",
"source": "#9uqw3QQMYEjccjAV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "59",
"display": "(d.1) Ewing tumor and Askin tumor of soft tissue"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:48.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:48.753 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:52.859+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:52.859+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:48.753 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "91",
"display": "(e) Other and unspecified malignant gonadal tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:49.384 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"559"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:49.384 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FkRfLfcn5G90SyWt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14161/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14161/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:49.384 [print] {
"resourceType": "Observation",
"id": "14161",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:54.057+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "91",
"display": "(e) Other and unspecified malignant gonadal tumors"
}
]
}
}
> *
print COOKIES
09:46:49.384 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:49.384 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"559"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:49.384 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FkRfLfcn5G90SyWt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14161/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14161/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:49.384 [print] {
"resourceType": "Observation",
"id": "14161",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:54.057+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "91",
"display": "(e) Other and unspecified malignant gonadal tumors"
}
]
}
}
> *
print COOKIES
09:46:49.384 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:49.985 [print] {
"resourceType": "Observation",
"id": "14161",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:54.057+02:00",
"source": "#FkRfLfcn5G90SyWt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "91",
"display": "(e) Other and unspecified malignant gonadal tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:50.855 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:51.438 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:55.513+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:55.513+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:51.438 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:52.038 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:52.038 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kyLYaJtjsScANl8X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14162/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14162/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:52.038 [print] {
"resourceType": "Observation",
"id": "14162",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:56.697+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
> *
print COOKIES
09:46:52.038 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:52.041 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:52.041 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kyLYaJtjsScANl8X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14162/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14162/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:52.041 [print] {
"resourceType": "Observation",
"id": "14162",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:56.697+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
> *
print COOKIES
09:46:52.041 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:52.694 [print] {
"resourceType": "Observation",
"id": "14162",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:56.697+02:00",
"source": "#kyLYaJtjsScANl8X",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:53.299 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:53.906 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:46:57.966+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:46:57.966+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:53.909 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "74",
"display": "(a.4) Intracranial and intraspinal yolk sac tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:54.510 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"558"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:54.510 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i1KOqazt2T1c6kTS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14163/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14163/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:54.511 [print] {
"resourceType": "Observation",
"id": "14163",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:59.164+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "74",
"display": "(a.4) Intracranial and intraspinal yolk sac tumor"
}
]
}
}
> *
print COOKIES
09:46:54.511 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:54.513 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"558"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:54.513 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i1KOqazt2T1c6kTS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14163/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:46:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14163/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:46:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:54.513 [print] {
"resourceType": "Observation",
"id": "14163",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:59.164+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "74",
"display": "(a.4) Intracranial and intraspinal yolk sac tumor"
}
]
}
}
> *
print COOKIES
09:46:54.513 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:55.125 [print] {
"resourceType": "Observation",
"id": "14163",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:46:59.164+02:00",
"source": "#i1KOqazt2T1c6kTS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "74",
"display": "(a.4) Intracranial and intraspinal yolk sac tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:55.764 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:56.440 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:00.433+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:00.433+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:56.440 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:57.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:57.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9H17B2N9XPtDXbrU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14164/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14164/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:57.305 [print] {
"resourceType": "Observation",
"id": "14164",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:01.779+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
> *
print COOKIES
09:46:57.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:57.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:57.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9H17B2N9XPtDXbrU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14164/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14164/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:57.305 [print] {
"resourceType": "Observation",
"id": "14164",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:01.779+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
> *
print COOKIES
09:46:57.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:46:57.883 [print] {
"resourceType": "Observation",
"id": "14164",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:01.779+02:00",
"source": "#9H17B2N9XPtDXbrU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:46:58.546 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:46:59.153 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:03.209+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:03.209+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:46:59.153 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "109",
"display": "(a.2) Pancreatoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:59.776 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:59.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tRVrYiCKpX6C6Erp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14165/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14165/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:59.777 [print] {
"resourceType": "Observation",
"id": "14165",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:04.438+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "109",
"display": "(a.2) Pancreatoblastoma"
}
]
}
}
> *
print COOKIES
09:46:59.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:46:59.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:46:59.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tRVrYiCKpX6C6Erp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14165/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14165/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:46:59.777 [print] {
"resourceType": "Observation",
"id": "14165",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:04.438+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "109",
"display": "(a.2) Pancreatoblastoma"
}
]
}
}
> *
print COOKIES
09:46:59.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:00.425 [print] {
"resourceType": "Observation",
"id": "14165",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:04.438+02:00",
"source": "#tRVrYiCKpX6C6Erp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "109",
"display": "(a.2) Pancreatoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:01.225 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:01.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:05.694+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:05.694+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:01.842 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "96",
"display": "(e) Skin carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:02.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:02.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wAhlGnuo3qLD4y8S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14166/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14166/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:02.467 [print] {
"resourceType": "Observation",
"id": "14166",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:07.122+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "96",
"display": "(e) Skin carcinomas"
}
]
}
}
> *
print COOKIES
09:47:02.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:02.469 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:02.469 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wAhlGnuo3qLD4y8S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14166/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14166/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:02.469 [print] {
"resourceType": "Observation",
"id": "14166",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:07.122+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "96",
"display": "(e) Skin carcinomas"
}
]
}
}
> *
print COOKIES
09:47:02.469 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:03.290 [print] {
"resourceType": "Observation",
"id": "14166",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:07.122+02:00",
"source": "#wAhlGnuo3qLD4y8S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "96",
"display": "(e) Skin carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:03.887 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:04.483 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:08.565+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:08.565+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:04.483 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "77",
"display": "(b.1) Malignant germinomas of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:05.053 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:05.053 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"02dpBqvB36E2IWdK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14167/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14167/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:05.053 [print] {
"resourceType": "Observation",
"id": "14167",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:09.724+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "77",
"display": "(b.1) Malignant germinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:47:05.053 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:05.053 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:05.053 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"02dpBqvB36E2IWdK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14167/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14167/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:05.053 [print] {
"resourceType": "Observation",
"id": "14167",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:09.724+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "77",
"display": "(b.1) Malignant germinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:47:05.053 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:05.691 [print] {
"resourceType": "Observation",
"id": "14167",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:09.724+02:00",
"source": "#02dpBqvB36E2IWdK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "77",
"display": "(b.1) Malignant germinomas of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:06.282 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:06.862 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:10.948+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:10.948+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:06.862 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "72",
"display": "(a.2) Intracranial and intraspinal teratomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:07.683 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:07.683 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pgC6HsS9LXVN2zyt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14168/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14168/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:07.683 [print] {
"resourceType": "Observation",
"id": "14168",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:12.145+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "72",
"display": "(a.2) Intracranial and intraspinal teratomas"
}
]
}
}
> *
print COOKIES
09:47:07.683 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:07.683 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:07.683 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pgC6HsS9LXVN2zyt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14168/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14168/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:07.683 [print] {
"resourceType": "Observation",
"id": "14168",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:12.145+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "72",
"display": "(a.2) Intracranial and intraspinal teratomas"
}
]
}
}
> *
print COOKIES
09:47:07.683 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:08.489 [print] {
"resourceType": "Observation",
"id": "14168",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:12.145+02:00",
"source": "#pgC6HsS9LXVN2zyt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "72",
"display": "(a.2) Intracranial and intraspinal teratomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:09.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:09.752 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:13.815+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:13.815+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:09.752 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:10.369 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:10.369 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8bjLtEhOkeFv9COQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14169/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14169/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:10.369 [print] {
"resourceType": "Observation",
"id": "14169",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:15.034+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
> *
print COOKIES
09:47:10.369 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:10.369 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:10.369 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8bjLtEhOkeFv9COQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14169/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14169/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:10.369 [print] {
"resourceType": "Observation",
"id": "14169",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:15.034+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
> *
print COOKIES
09:47:10.369 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:10.987 [print] {
"resourceType": "Observation",
"id": "14169",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:15.034+02:00",
"source": "#8bjLtEhOkeFv9COQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:11.626 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 18ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 18ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:12.273 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:16.293+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:16.293+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:12.273 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:12.859 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:12.859 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9TQ9kdI576zBWuig"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14170/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14170/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:12.859 [print] {
"resourceType": "Observation",
"id": "14170",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:17.532+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
> *
print COOKIES
09:47:12.859 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:12.859 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:12.859 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9TQ9kdI576zBWuig"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14170/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14170/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:12.859 [print] {
"resourceType": "Observation",
"id": "14170",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:17.532+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
> *
print COOKIES
09:47:12.859 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:13.445 [print] {
"resourceType": "Observation",
"id": "14170",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:17.532+02:00",
"source": "#9TQ9kdI576zBWuig",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:14.036 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:14.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:18.702+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:18.702+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:14.617 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:15.190 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:15.190 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ReJaRi5qALnz5Uoq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14171/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14171/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:15.190 [print] {
"resourceType": "Observation",
"id": "14171",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:19.870+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
> *
print COOKIES
09:47:15.190 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:15.206 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:15.206 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ReJaRi5qALnz5Uoq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14171/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14171/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:15.206 [print] {
"resourceType": "Observation",
"id": "14171",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:19.870+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
> *
print COOKIES
09:47:15.206 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:15.822 [print] {
"resourceType": "Observation",
"id": "14171",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:19.870+02:00",
"source": "#ReJaRi5qALnz5Uoq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:16.618 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:17.275 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:21.299+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:21.299+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:17.275 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "100",
"display": "(f.4) Carcinomas of lung"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:17.923 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:17.923 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qSNwPPGYvANuPKjl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14172/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14172/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:17.923 [print] {
"resourceType": "Observation",
"id": "14172",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:22.595+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "100",
"display": "(f.4) Carcinomas of lung"
}
]
}
}
> *
print COOKIES
09:47:17.923 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:17.923 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:17.923 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qSNwPPGYvANuPKjl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14172/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14172/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:17.923 [print] {
"resourceType": "Observation",
"id": "14172",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:22.595+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "100",
"display": "(f.4) Carcinomas of lung"
}
]
}
}
> *
print COOKIES
09:47:17.923 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:18.823 [print] {
"resourceType": "Observation",
"id": "14172",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:22.595+02:00",
"source": "#qSNwPPGYvANuPKjl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "100",
"display": "(f.4) Carcinomas of lung"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:19.425 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:20.043 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:24.083+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:24.083+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:20.043 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:20.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"541"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:20.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3C8dyePOrFXlmVai"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14173/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14173/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:20.634 [print] {
"resourceType": "Observation",
"id": "14173",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:25.306+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
> *
print COOKIES
09:47:20.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:20.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"541"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:20.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3C8dyePOrFXlmVai"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14173/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14173/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:20.634 [print] {
"resourceType": "Observation",
"id": "14173",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:25.306+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
> *
print COOKIES
09:47:20.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:21.192 [print] {
"resourceType": "Observation",
"id": "14173",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:25.306+02:00",
"source": "#3C8dyePOrFXlmVai",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:21.794 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:23.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:26.468+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:26.468+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:23.447 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:24.033 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:24.033 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tjWFRjWrDo6lZRwz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14174/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14174/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:24.033 [print] {
"resourceType": "Observation",
"id": "14174",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:28.703+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
> *
print COOKIES
09:47:24.033 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:24.033 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:24.033 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tjWFRjWrDo6lZRwz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14174/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14174/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:24.033 [print] {
"resourceType": "Observation",
"id": "14174",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:28.703+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
> *
print COOKIES
09:47:24.033 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:32.850 [print] {
"resourceType": "Observation",
"id": "14174",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:28.703+02:00",
"source": "#tjWFRjWrDo6lZRwz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:33.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:34.086 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:38.105+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:38.105+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:34.086 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "86",
"display": "(c.4) Gonadal yolk sac tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:34.672 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:34.672 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o5AAOqzSFpZ8krIt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14175/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14175/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:34.672 [print] {
"resourceType": "Observation",
"id": "14175",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:39.352+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "86",
"display": "(c.4) Gonadal yolk sac tumor"
}
]
}
}
> *
print COOKIES
09:47:34.672 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:34.687 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:34.687 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o5AAOqzSFpZ8krIt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14175/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14175/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:34.687 [print] {
"resourceType": "Observation",
"id": "14175",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:39.352+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "86",
"display": "(c.4) Gonadal yolk sac tumor"
}
]
}
}
> *
print COOKIES
09:47:34.687 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:35.276 [print] {
"resourceType": "Observation",
"id": "14175",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:39.352+02:00",
"source": "#o5AAOqzSFpZ8krIt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "86",
"display": "(c.4) Gonadal yolk sac tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:35.914 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:36.547 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:40.585+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:40.585+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:36.547 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:37.234 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:37.234 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Tdjv8UG75saBY7nv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14176/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14176/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:37.234 [print] {
"resourceType": "Observation",
"id": "14176",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:41.889+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
> *
print COOKIES
09:47:37.234 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:37.234 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:37.234 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Tdjv8UG75saBY7nv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14176/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14176/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:37.234 [print] {
"resourceType": "Observation",
"id": "14176",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:41.889+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
> *
print COOKIES
09:47:37.234 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:37.872 [print] {
"resourceType": "Observation",
"id": "14176",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:41.889+02:00",
"source": "#Tdjv8UG75saBY7nv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:38.472 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:39.151 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:43.151+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:43.151+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:39.151 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:39.737 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:39.737 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hQwlvuZJhmWqqHKy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14177/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14177/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:39.737 [print] {
"resourceType": "Observation",
"id": "14177",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:44.407+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
> *
print COOKIES
09:47:39.737 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:39.737 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:39.737 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hQwlvuZJhmWqqHKy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14177/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14177/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:39.737 [print] {
"resourceType": "Observation",
"id": "14177",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:44.407+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
> *
print COOKIES
09:47:39.737 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:40.343 [print] {
"resourceType": "Observation",
"id": "14177",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:44.407+02:00",
"source": "#hQwlvuZJhmWqqHKy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:40.931 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:41.752 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:45.595+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:45.595+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:41.754 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "49",
"display": "(d.1) Malignant fibrous neoplasms of bone"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:42.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:42.402 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rP2dlB0eFXkHkGNM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14178/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14178/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:42.402 [print] {
"resourceType": "Observation",
"id": "14178",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:47.045+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "49",
"display": "(d.1) Malignant fibrous neoplasms of bone"
}
]
}
}
> *
print COOKIES
09:47:42.402 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:42.404 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:42.404 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rP2dlB0eFXkHkGNM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14178/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14178/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:42.404 [print] {
"resourceType": "Observation",
"id": "14178",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:47.045+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "49",
"display": "(d.1) Malignant fibrous neoplasms of bone"
}
]
}
}
> *
print COOKIES
09:47:42.404 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:43.058 [print] {
"resourceType": "Observation",
"id": "14178",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:47.045+02:00",
"source": "#rP2dlB0eFXkHkGNM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "49",
"display": "(d.1) Malignant fibrous neoplasms of bone"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:43.701 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:44.384 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:48.377+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:48.377+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:44.384 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:44.985 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:44.985 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xyH3Yv4bezdtMtGy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14179/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14179/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:44.985 [print] {
"resourceType": "Observation",
"id": "14179",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:49.651+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
> *
print COOKIES
09:47:44.985 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:44.985 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:44.985 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xyH3Yv4bezdtMtGy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14179/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14179/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:44.985 [print] {
"resourceType": "Observation",
"id": "14179",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:49.651+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
> *
print COOKIES
09:47:44.985 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:45.610 [print] {
"resourceType": "Observation",
"id": "14179",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:49.651+02:00",
"source": "#xyH3Yv4bezdtMtGy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:46.228 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:46.818 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:50.898+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:50.898+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:46.818 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "67",
"display": "(d.9) Osseous and chondromatous neoplasms of soft tissue"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:47.464 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"565"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:47.464 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bgz38QFStVY7EkPU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14180/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14180/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:47.464 [print] {
"resourceType": "Observation",
"id": "14180",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:52.128+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "67",
"display": "(d.9) Osseous and chondromatous neoplasms of soft tissue"
}
]
}
}
> *
print COOKIES
09:47:47.464 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:47.466 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"565"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:47.466 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bgz38QFStVY7EkPU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14180/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14180/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:47.466 [print] {
"resourceType": "Observation",
"id": "14180",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:52.128+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "67",
"display": "(d.9) Osseous and chondromatous neoplasms of soft tissue"
}
]
}
}
> *
print COOKIES
09:47:47.466 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:48.094 [print] {
"resourceType": "Observation",
"id": "14180",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:52.128+02:00",
"source": "#Bgz38QFStVY7EkPU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "67",
"display": "(d.9) Osseous and chondromatous neoplasms of soft tissue"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:48.750 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:49.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:53.398+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:53.398+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:49.374 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:49.972 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:49.972 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aMOfWR4gPTuXs6Ko"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14181/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14181/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:49.972 [print] {
"resourceType": "Observation",
"id": "14181",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:54.640+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
> *
print COOKIES
09:47:49.972 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:49.972 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:49.972 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aMOfWR4gPTuXs6Ko"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14181/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14181/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:49.972 [print] {
"resourceType": "Observation",
"id": "14181",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:54.640+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
> *
print COOKIES
09:47:49.972 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:50.596 [print] {
"resourceType": "Observation",
"id": "14181",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:54.640+02:00",
"source": "#aMOfWR4gPTuXs6Ko",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:51.166 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:51.783 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:55.844+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:55.844+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:51.783 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:52.406 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:52.406 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1JrfKBAe0diyCImR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14182/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14182/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:52.406 [print] {
"resourceType": "Observation",
"id": "14182",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:57.067+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
> *
print COOKIES
09:47:52.406 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:52.406 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:52.406 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1JrfKBAe0diyCImR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14182/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14182/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:52.406 [print] {
"resourceType": "Observation",
"id": "14182",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:57.067+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
> *
print COOKIES
09:47:52.406 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:52.996 [print] {
"resourceType": "Observation",
"id": "14182",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:57.067+02:00",
"source": "#1JrfKBAe0diyCImR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:53.934 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:54.566 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:47:58.562+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:47:58.562+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:54.573 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:55.152 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:55.152 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Gj3PWZvJNGct70TQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14183/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14183/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:55.152 [print] {
"resourceType": "Observation",
"id": "14183",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:59.813+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
> *
print COOKIES
09:47:55.152 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:55.152 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:55.152 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Gj3PWZvJNGct70TQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14183/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:47:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14183/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:47:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:55.152 [print] {
"resourceType": "Observation",
"id": "14183",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:59.813+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
> *
print COOKIES
09:47:55.152 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:55.758 [print] {
"resourceType": "Observation",
"id": "14183",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:47:59.813+02:00",
"source": "#Gj3PWZvJNGct70TQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:56.381 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:56.961 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:01.054+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:01.054+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:56.976 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "82",
"display": "(b.6) Other and unspecified malignant mixed germ cell tumors of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:57.585 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"608"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:57.585 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CyWQYGTlXKLbPo0o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14184/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14184/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:57.585 [print] {
"resourceType": "Observation",
"id": "14184",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:02.242+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "82",
"display": "(b.6) Other and unspecified malignant mixed germ cell tumors of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:47:57.585 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:57.585 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"608"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:57.585 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CyWQYGTlXKLbPo0o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14184/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14184/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:57.585 [print] {
"resourceType": "Observation",
"id": "14184",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:02.242+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "82",
"display": "(b.6) Other and unspecified malignant mixed germ cell tumors of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:47:57.585 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:47:58.149 [print] {
"resourceType": "Observation",
"id": "14184",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:02.242+02:00",
"source": "#CyWQYGTlXKLbPo0o",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "82",
"display": "(b.6) Other and unspecified malignant mixed germ cell tumors of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:47:58.766 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:47:59.366 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:03.433+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:03.433+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:47:59.366 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "19",
"display": "(b) Astrocytomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:59.968 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"525"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:59.968 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lNfFx0kuqkCApjp2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14185/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14185/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:59.968 [print] {
"resourceType": "Observation",
"id": "14185",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:04.631+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "19",
"display": "(b) Astrocytomas"
}
]
}
}
> *
print COOKIES
09:47:59.968 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:47:59.968 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"525"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:47:59.968 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lNfFx0kuqkCApjp2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14185/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14185/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:47:59.968 [print] {
"resourceType": "Observation",
"id": "14185",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:04.631+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "19",
"display": "(b) Astrocytomas"
}
]
}
}
> *
print COOKIES
09:47:59.968 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:01.655 [print] {
"resourceType": "Observation",
"id": "14185",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:04.631+02:00",
"source": "#lNfFx0kuqkCApjp2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "19",
"display": "(b) Astrocytomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:02.309 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:02.888 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:06.974+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:06.974+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:02.888 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:03.516 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:03.516 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q3HQ6nMmXHV00sEz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14186/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14186/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:03.516 [print] {
"resourceType": "Observation",
"id": "14186",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:08.179+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
> *
print COOKIES
09:48:03.516 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:03.516 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:03.516 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q3HQ6nMmXHV00sEz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14186/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14186/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:03.516 [print] {
"resourceType": "Observation",
"id": "14186",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:08.179+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
> *
print COOKIES
09:48:03.516 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:05.098 [print] {
"resourceType": "Observation",
"id": "14186",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:08.179+02:00",
"source": "#Q3HQ6nMmXHV00sEz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:06.803 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:07.425 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:11.479+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:11.479+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:07.425 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:08.027 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:08.027 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jS5SUR8XgL6epzv3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14187/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14187/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:08.027 [print] {
"resourceType": "Observation",
"id": "14187",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:12.686+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
> *
print COOKIES
09:48:08.027 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:08.027 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:08.027 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jS5SUR8XgL6epzv3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14187/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14187/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:08.027 [print] {
"resourceType": "Observation",
"id": "14187",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:12.686+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
> *
print COOKIES
09:48:08.027 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:08.937 [print] {
"resourceType": "Observation",
"id": "14187",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:12.686+02:00",
"source": "#jS5SUR8XgL6epzv3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:09.538 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:10.150 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:14.211+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:14.211+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:10.150 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:11.039 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:11.039 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"94ZZUhJOiGlOivLN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14188/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14188/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:11.039 [print] {
"resourceType": "Observation",
"id": "14188",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:15.705+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
> *
print COOKIES
09:48:11.039 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:11.039 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:11.039 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"94ZZUhJOiGlOivLN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14188/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14188/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:11.039 [print] {
"resourceType": "Observation",
"id": "14188",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:15.705+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
> *
print COOKIES
09:48:11.039 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:11.659 [print] {
"resourceType": "Observation",
"id": "14188",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:15.705+02:00",
"source": "#94ZZUhJOiGlOivLN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:12.422 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:13.278 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:17.076+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:17.076+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:13.278 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:13.865 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:13.865 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HME9QYse2QBkpSRf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14189/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14189/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:13.865 [print] {
"resourceType": "Observation",
"id": "14189",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:18.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
> *
print COOKIES
09:48:13.865 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:13.865 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:13.865 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HME9QYse2QBkpSRf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14189/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14189/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:13.865 [print] {
"resourceType": "Observation",
"id": "14189",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:18.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
> *
print COOKIES
09:48:13.865 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:14.432 [print] {
"resourceType": "Observation",
"id": "14189",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:18.527+02:00",
"source": "#HME9QYse2QBkpSRf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:15.034 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:15.778 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:19.706+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:19.706+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:15.778 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:16.511 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:16.511 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yTnUaoyPmIrob9W2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14190/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14190/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:16.511 [print] {
"resourceType": "Observation",
"id": "14190",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:21.184+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
> *
print COOKIES
09:48:16.511 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:16.511 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:16.511 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yTnUaoyPmIrob9W2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14190/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14190/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:16.511 [print] {
"resourceType": "Observation",
"id": "14190",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:21.184+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
> *
print COOKIES
09:48:16.511 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:17.430 [print] {
"resourceType": "Observation",
"id": "14190",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:21.184+02:00",
"source": "#yTnUaoyPmIrob9W2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:18.100 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:18.749 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:22.775+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:22.775+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:18.749 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-31",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:19.823 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:19.823 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EuFit9G9DFxzY1B3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14191/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14191/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:19.823 [print] {
"resourceType": "Observation",
"id": "14191",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:24.490+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-31",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
> *
print COOKIES
09:48:19.823 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:19.823 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:19.823 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EuFit9G9DFxzY1B3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14191/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14191/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:19.823 [print] {
"resourceType": "Observation",
"id": "14191",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:24.490+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-31",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
> *
print COOKIES
09:48:19.823 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:20.409 [print] {
"resourceType": "Observation",
"id": "14191",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:24.490+02:00",
"source": "#EuFit9G9DFxzY1B3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-31",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:21.011 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:21.613 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:25.678+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:25.678+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:21.613 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:22.217 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"541"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:22.217 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2NA55KklPBTqBnMz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14192/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14192/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:22.217 [print] {
"resourceType": "Observation",
"id": "14192",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:26.884+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
> *
print COOKIES
09:48:22.217 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:22.217 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"541"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:22.217 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2NA55KklPBTqBnMz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14192/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14192/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:22.217 [print] {
"resourceType": "Observation",
"id": "14192",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:26.884+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
> *
print COOKIES
09:48:22.217 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:23.354 [print] {
"resourceType": "Observation",
"id": "14192",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:26.884+02:00",
"source": "#2NA55KklPBTqBnMz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:24.014 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:24.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:28.665+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:28.665+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:24.618 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "25",
"display": "(d.2) Mixed and unspecified gliomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:25.236 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"544"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:25.236 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pCtvz71JLSyJQi6B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14193/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14193/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:25.237 [print] {
"resourceType": "Observation",
"id": "14193",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:29.903+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "25",
"display": "(d.2) Mixed and unspecified gliomas"
}
]
}
}
> *
print COOKIES
09:48:25.237 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:25.239 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"544"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:25.239 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pCtvz71JLSyJQi6B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14193/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14193/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:25.239 [print] {
"resourceType": "Observation",
"id": "14193",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:29.903+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "25",
"display": "(d.2) Mixed and unspecified gliomas"
}
]
}
}
> *
print COOKIES
09:48:25.239 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:25.804 [print] {
"resourceType": "Observation",
"id": "14193",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:29.903+02:00",
"source": "#pCtvz71JLSyJQi6B",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "25",
"display": "(d.2) Mixed and unspecified gliomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:26.386 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:27.006 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:31.058+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:31.058+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:27.007 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:27.646 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:27.646 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kzxFCIvEha6jhMEe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14194/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14194/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:27.647 [print] {
"resourceType": "Observation",
"id": "14194",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:32.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
> *
print COOKIES
09:48:27.647 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:27.648 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:27.648 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kzxFCIvEha6jhMEe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14194/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14194/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:27.648 [print] {
"resourceType": "Observation",
"id": "14194",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:32.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
> *
print COOKIES
09:48:27.648 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:28.222 [print] {
"resourceType": "Observation",
"id": "14194",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:32.300+02:00",
"source": "#kzxFCIvEha6jhMEe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:28.835 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:29.702 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:33.487+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:33.487+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:29.703 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:30.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:30.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KRhzpGH5zIQbf5kB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14195/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14195/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:30.307 [print] {
"resourceType": "Observation",
"id": "14195",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:34.977+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
> *
print COOKIES
09:48:30.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:30.309 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:30.309 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KRhzpGH5zIQbf5kB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14195/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14195/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:30.309 [print] {
"resourceType": "Observation",
"id": "14195",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:34.977+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
> *
print COOKIES
09:48:30.309 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:30.913 [print] {
"resourceType": "Observation",
"id": "14195",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:34.977+02:00",
"source": "#KRhzpGH5zIQbf5kB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:31.910 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:33.523 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:36.580+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:36.580+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:33.524 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-01-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:34.160 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:34.160 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rKLi8VHDV57w1AfZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14196/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14196/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:34.160 [print] {
"resourceType": "Observation",
"id": "14196",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:38.823+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-01-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
> *
print COOKIES
09:48:34.160 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:34.162 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:34.162 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rKLi8VHDV57w1AfZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14196/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14196/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:34.163 [print] {
"resourceType": "Observation",
"id": "14196",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:38.823+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-01-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
> *
print COOKIES
09:48:34.163 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:34.730 [print] {
"resourceType": "Observation",
"id": "14196",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:38.823+02:00",
"source": "#rKLi8VHDV57w1AfZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-01-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:35.342 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:36.170 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:40.006+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:40.006+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:36.172 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:36.767 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:36.767 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"flSjpqcSfa6mFNt3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14197/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14197/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:36.767 [print] {
"resourceType": "Observation",
"id": "14197",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:41.414+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
> *
print COOKIES
09:48:36.767 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:36.769 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:36.769 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"flSjpqcSfa6mFNt3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14197/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14197/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:36.769 [print] {
"resourceType": "Observation",
"id": "14197",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:41.414+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
> *
print COOKIES
09:48:36.769 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:37.383 [print] {
"resourceType": "Observation",
"id": "14197",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:41.414+02:00",
"source": "#flSjpqcSfa6mFNt3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:38.021 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:38.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:42.665+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:42.665+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:38.841 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:39.473 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:39.473 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oBdZ1rk5qsEdv1Le"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14198/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14198/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:39.473 [print] {
"resourceType": "Observation",
"id": "14198",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:44.135+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
> *
print COOKIES
09:48:39.473 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:39.475 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:39.475 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oBdZ1rk5qsEdv1Le"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14198/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14198/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:39.475 [print] {
"resourceType": "Observation",
"id": "14198",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:44.135+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
> *
print COOKIES
09:48:39.475 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:40.075 [print] {
"resourceType": "Observation",
"id": "14198",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:44.135+02:00",
"source": "#oBdZ1rk5qsEdv1Le",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:40.691 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:41.242 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:45.361+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:45.361+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:41.242 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "34",
"display": "(b) Other peripheral nervous cell tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:41.829 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:41.829 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WjM1afSK3SbwZMYa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14199/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14199/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:41.829 [print] {
"resourceType": "Observation",
"id": "14199",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:46.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "34",
"display": "(b) Other peripheral nervous cell tumors"
}
]
}
}
> *
print COOKIES
09:48:41.829 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:41.829 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:41.829 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WjM1afSK3SbwZMYa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14199/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14199/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:41.829 [print] {
"resourceType": "Observation",
"id": "14199",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:46.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "34",
"display": "(b) Other peripheral nervous cell tumors"
}
]
}
}
> *
print COOKIES
09:48:41.829 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:42.446 [print] {
"resourceType": "Observation",
"id": "14199",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:46.505+02:00",
"source": "#WjM1afSK3SbwZMYa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "34",
"display": "(b) Other peripheral nervous cell tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:43.066 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:43.683 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:47.723+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:47.723+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:43.683 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "106",
"display": "(f.10) Carcinomas of other specified sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:44.325 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:44.325 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mwNOyivR2HGQxct1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14200/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14200/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:44.325 [print] {
"resourceType": "Observation",
"id": "14200",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:48.994+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "106",
"display": "(f.10) Carcinomas of other specified sites"
}
]
}
}
> *
print COOKIES
09:48:44.325 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:44.325 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:44.325 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mwNOyivR2HGQxct1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14200/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14200/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:44.325 [print] {
"resourceType": "Observation",
"id": "14200",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:48.994+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "106",
"display": "(f.10) Carcinomas of other specified sites"
}
]
}
}
> *
print COOKIES
09:48:44.325 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:44.959 [print] {
"resourceType": "Observation",
"id": "14200",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:48.994+02:00",
"source": "#mwNOyivR2HGQxct1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "106",
"display": "(f.10) Carcinomas of other specified sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:45.579 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:46.183 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:50.250+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:50.250+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:46.199 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "68",
"display": "(d.10) Alveolar soft parts sarcoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:46.800 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:46.800 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4RqA607x3Ku06bh8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14201/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14201/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:46.800 [print] {
"resourceType": "Observation",
"id": "14201",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:51.457+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "68",
"display": "(d.10) Alveolar soft parts sarcoma"
}
]
}
}
> *
print COOKIES
09:48:46.800 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:46.800 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:46.800 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4RqA607x3Ku06bh8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14201/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14201/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:46.800 [print] {
"resourceType": "Observation",
"id": "14201",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:51.457+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "68",
"display": "(d.10) Alveolar soft parts sarcoma"
}
]
}
}
> *
print COOKIES
09:48:46.800 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:47.439 [print] {
"resourceType": "Observation",
"id": "14201",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:51.457+02:00",
"source": "#4RqA607x3Ku06bh8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "68",
"display": "(d.10) Alveolar soft parts sarcoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:48.087 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:48.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:52.751+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:52.751+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:48.727 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:49.310 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:49.310 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mXeCrIYB6Mwo0eTr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14202/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14202/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:49.310 [print] {
"resourceType": "Observation",
"id": "14202",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:53.985+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
> *
print COOKIES
09:48:49.310 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:49.310 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:49.310 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mXeCrIYB6Mwo0eTr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14202/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14202/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:49.310 [print] {
"resourceType": "Observation",
"id": "14202",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:53.985+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
> *
print COOKIES
09:48:49.310 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:49.933 [print] {
"resourceType": "Observation",
"id": "14202",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:53.985+02:00",
"source": "#mXeCrIYB6Mwo0eTr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:50.551 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:51.155 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:55.230+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:55.230+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:51.155 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:51.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:51.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u6MgeknUXP8P6nZO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14203/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14203/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:51.819 [print] {
"resourceType": "Observation",
"id": "14203",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:56.478+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
> *
print COOKIES
09:48:51.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:51.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:51.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u6MgeknUXP8P6nZO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14203/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14203/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:51.819 [print] {
"resourceType": "Observation",
"id": "14203",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:56.478+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
> *
print COOKIES
09:48:51.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:52.447 [print] {
"resourceType": "Observation",
"id": "14203",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:56.478+02:00",
"source": "#u6MgeknUXP8P6nZO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:53.064 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:53.665 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:48:57.723+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:48:57.723+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:53.665 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:55.317 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:55.317 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qOOUHmjeI4E8IYA1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14204/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14204/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:55.317 [print] {
"resourceType": "Observation",
"id": "14204",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:59.985+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
> *
print COOKIES
09:48:55.317 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:48:55.317 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:48:55.317 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qOOUHmjeI4E8IYA1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14204/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:48:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14204/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:48:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:48:55.317 [print] {
"resourceType": "Observation",
"id": "14204",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:59.985+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
> *
print COOKIES
09:48:55.317 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:48:55.956 [print] {
"resourceType": "Observation",
"id": "14204",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:48:59.985+02:00",
"source": "#qOOUHmjeI4E8IYA1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:48:56.835 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:48:57.475 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:01.444+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:01.444+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:48:57.475 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:00.101 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:00.101 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"krqDDhPvgCNwJoLk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14205/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14205/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:00.101 [print] {
"resourceType": "Observation",
"id": "14205",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:04.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
> *
print COOKIES
09:49:00.101 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:00.101 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:00.101 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"krqDDhPvgCNwJoLk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14205/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14205/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:00.101 [print] {
"resourceType": "Observation",
"id": "14205",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:04.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
> *
print COOKIES
09:49:00.101 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:00.671 [print] {
"resourceType": "Observation",
"id": "14205",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:04.758+02:00",
"source": "#krqDDhPvgCNwJoLk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:01.303 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:01.889 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:05.965+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:05.965+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:01.889 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:02.526 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:02.526 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9EzI4cOYnOME4ht3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14206/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14206/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:02.526 [print] {
"resourceType": "Observation",
"id": "14206",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:07.193+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
> *
print COOKIES
09:49:02.526 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:02.526 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:02.526 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9EzI4cOYnOME4ht3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14206/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14206/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:02.526 [print] {
"resourceType": "Observation",
"id": "14206",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:07.193+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
> *
print COOKIES
09:49:02.526 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:03.158 [print] {
"resourceType": "Observation",
"id": "14206",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:07.193+02:00",
"source": "#9EzI4cOYnOME4ht3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:04.048 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:04.681 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:08.708+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:08.708+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:04.681 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:05.352 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:05.352 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JEtB5Bgs4VfQZVY1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14207/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14207/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:05.352 [print] {
"resourceType": "Observation",
"id": "14207",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:10.030+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
> *
print COOKIES
09:49:05.352 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:05.352 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:05.352 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JEtB5Bgs4VfQZVY1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14207/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14207/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:05.352 [print] {
"resourceType": "Observation",
"id": "14207",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:10.030+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
> *
print COOKIES
09:49:05.352 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:05.937 [print] {
"resourceType": "Observation",
"id": "14207",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:10.030+02:00",
"source": "#JEtB5Bgs4VfQZVY1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:06.554 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:07.654 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:11.225+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:11.225+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:07.654 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:08.591 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"519"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:08.591 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m6hhbS4OxImHchLU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14208/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14208/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:08.591 [print] {
"resourceType": "Observation",
"id": "14208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:13.258+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
> *
print COOKIES
09:49:08.591 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:08.591 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"519"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:08.591 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m6hhbS4OxImHchLU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14208/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14208/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:08.591 [print] {
"resourceType": "Observation",
"id": "14208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:13.258+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
> *
print COOKIES
09:49:08.591 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:09.215 [print] {
"resourceType": "Observation",
"id": "14208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:13.258+02:00",
"source": "#m6hhbS4OxImHchLU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:09.816 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:11.099 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:14.486+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:14.486+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:11.114 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:11.700 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:11.700 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CTv3N9M7ukoUYE1B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14209/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14209/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:11.700 [print] {
"resourceType": "Observation",
"id": "14209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:16.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
> *
print COOKIES
09:49:11.700 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:11.700 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:11.700 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CTv3N9M7ukoUYE1B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14209/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14209/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:11.700 [print] {
"resourceType": "Observation",
"id": "14209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:16.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
> *
print COOKIES
09:49:11.700 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:12.302 [print] {
"resourceType": "Observation",
"id": "14209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:16.371+02:00",
"source": "#CTv3N9M7ukoUYE1B",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:12.943 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:13.595 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:17.613+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:17.613+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:13.595 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "78",
"display": "(b.2) Malignant teratomas of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:14.188 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"573"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:14.188 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tfbiy0TtAmJjtQTZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14210/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14210/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:14.188 [print] {
"resourceType": "Observation",
"id": "14210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:18.865+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "78",
"display": "(b.2) Malignant teratomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:49:14.188 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:14.188 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"573"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:14.188 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tfbiy0TtAmJjtQTZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14210/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14210/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:14.188 [print] {
"resourceType": "Observation",
"id": "14210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:18.865+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "78",
"display": "(b.2) Malignant teratomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:49:14.188 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:15.169 [print] {
"resourceType": "Observation",
"id": "14210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:18.865+02:00",
"source": "#tfbiy0TtAmJjtQTZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "78",
"display": "(b.2) Malignant teratomas of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:15.784 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:16.633 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:20.440+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:20.440+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:16.633 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:17.280 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:17.280 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kKFlYU0uk3QmjVI1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14211/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14211/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:17.280 [print] {
"resourceType": "Observation",
"id": "14211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:21.927+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
09:49:17.280 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:17.282 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:17.282 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kKFlYU0uk3QmjVI1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14211/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14211/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:17.282 [print] {
"resourceType": "Observation",
"id": "14211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:21.927+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
09:49:17.282 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:17.866 [print] {
"resourceType": "Observation",
"id": "14211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:21.927+02:00",
"source": "#kKFlYU0uk3QmjVI1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:18.476 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:19.079 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:23.138+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:23.138+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:19.079 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "63",
"display": "(d.5) Fibrohistiocytic tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:19.663 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:19.663 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rqdEWXfwteO52iXt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14212/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14212/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:19.663 [print] {
"resourceType": "Observation",
"id": "14212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:24.329+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "63",
"display": "(d.5) Fibrohistiocytic tumors"
}
]
}
}
> *
print COOKIES
09:49:19.663 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:19.665 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:19.665 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rqdEWXfwteO52iXt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14212/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14212/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:19.665 [print] {
"resourceType": "Observation",
"id": "14212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:24.329+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "63",
"display": "(d.5) Fibrohistiocytic tumors"
}
]
}
}
> *
print COOKIES
09:49:19.665 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:20.254 [print] {
"resourceType": "Observation",
"id": "14212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:24.329+02:00",
"source": "#rqdEWXfwteO52iXt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "63",
"display": "(d.5) Fibrohistiocytic tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:20.881 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:21.487 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:25.555+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:25.555+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:21.487 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "92",
"display": "(a) Adrenocortical carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:22.154 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:22.154 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gUfX7UEnnyUqkwp1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14213/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14213/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:22.154 [print] {
"resourceType": "Observation",
"id": "14213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:26.808+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "92",
"display": "(a) Adrenocortical carcinomas"
}
]
}
}
> *
print COOKIES
09:49:22.154 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:22.157 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:22.157 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gUfX7UEnnyUqkwp1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14213/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14213/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:22.157 [print] {
"resourceType": "Observation",
"id": "14213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:26.808+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "92",
"display": "(a) Adrenocortical carcinomas"
}
]
}
}
> *
print COOKIES
09:49:22.157 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:22.735 [print] {
"resourceType": "Observation",
"id": "14213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:26.808+02:00",
"source": "#gUfX7UEnnyUqkwp1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "92",
"display": "(a) Adrenocortical carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:23.385 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:24.025 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:28.051+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:28.051+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:24.026 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:24.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"551"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:24.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IJQnTC93qixBJlS3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14214/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14214/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:24.644 [print] {
"resourceType": "Observation",
"id": "14214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:29.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
> *
print COOKIES
09:49:24.644 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:24.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"551"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:24.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IJQnTC93qixBJlS3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14214/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14214/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:24.644 [print] {
"resourceType": "Observation",
"id": "14214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:29.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
> *
print COOKIES
09:49:24.644 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:25.262 [print] {
"resourceType": "Observation",
"id": "14214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:29.315+02:00",
"source": "#IJQnTC93qixBJlS3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:25.887 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:26.518 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:30.561+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:30.561+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:26.519 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:27.153 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:27.153 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"23c6gkK73linl6HL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14215/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14215/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:27.153 [print] {
"resourceType": "Observation",
"id": "14215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:31.819+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
> *
print COOKIES
09:49:27.153 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:27.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:27.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"23c6gkK73linl6HL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14215/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14215/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:27.155 [print] {
"resourceType": "Observation",
"id": "14215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:31.819+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
> *
print COOKIES
09:49:27.155 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:27.763 [print] {
"resourceType": "Observation",
"id": "14215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:31.819+02:00",
"source": "#23c6gkK73linl6HL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:28.353 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:28.974 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:33.015+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:33.015+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:28.974 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:29.585 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"539"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:29.585 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XQ4yXYwlcNdLes3u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14216/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14216/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:29.585 [print] {
"resourceType": "Observation",
"id": "14216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:34.250+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
> *
print COOKIES
09:49:29.585 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:29.585 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"539"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:29.585 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XQ4yXYwlcNdLes3u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14216/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14216/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:29.585 [print] {
"resourceType": "Observation",
"id": "14216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:34.250+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
> *
print COOKIES
09:49:29.585 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:30.176 [print] {
"resourceType": "Observation",
"id": "14216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:34.250+02:00",
"source": "#XQ4yXYwlcNdLes3u",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:30.792 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:31.398 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:35.470+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:35.470+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:31.400 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "103",
"display": "(f.7) Carcinomas of cervix uteri"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:32.000 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:32.000 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UrFL6GXojLZIZBE6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14217/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14217/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:32.000 [print] {
"resourceType": "Observation",
"id": "14217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:36.655+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "103",
"display": "(f.7) Carcinomas of cervix uteri"
}
]
}
}
> *
print COOKIES
09:49:32.000 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:32.000 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:32.000 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UrFL6GXojLZIZBE6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14217/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14217/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:32.000 [print] {
"resourceType": "Observation",
"id": "14217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:36.655+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "103",
"display": "(f.7) Carcinomas of cervix uteri"
}
]
}
}
> *
print COOKIES
09:49:32.000 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:32.594 [print] {
"resourceType": "Observation",
"id": "14217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:36.655+02:00",
"source": "#UrFL6GXojLZIZBE6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "103",
"display": "(f.7) Carcinomas of cervix uteri"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:33.250 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:33.850 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:37.914+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:37.914+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:33.850 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:34.476 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:34.476 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JueWXvyUVocfOBs6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14218/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14218/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:34.476 [print] {
"resourceType": "Observation",
"id": "14218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:39.139+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
> *
print COOKIES
09:49:34.476 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:34.478 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:34.478 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JueWXvyUVocfOBs6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14218/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14218/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:34.478 [print] {
"resourceType": "Observation",
"id": "14218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:39.139+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
> *
print COOKIES
09:49:34.478 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:35.114 [print] {
"resourceType": "Observation",
"id": "14218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:39.139+02:00",
"source": "#JueWXvyUVocfOBs6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:35.721 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:36.311 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:40.403+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:40.403+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:36.311 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:36.911 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:36.911 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FmskjTuVv5RMF0j9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14219/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14219/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:36.911 [print] {
"resourceType": "Observation",
"id": "14219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:41.561+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
> *
print COOKIES
09:49:36.911 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:36.914 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:36.914 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FmskjTuVv5RMF0j9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14219/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14219/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:36.914 [print] {
"resourceType": "Observation",
"id": "14219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:41.561+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
> *
print COOKIES
09:49:36.914 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:37.504 [print] {
"resourceType": "Observation",
"id": "14219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:41.561+02:00",
"source": "#FmskjTuVv5RMF0j9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:38.118 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:38.702 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:42.788+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:42.788+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:38.704 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:39.594 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:39.594 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lDMXs81Uxjwymv0M"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14220/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14220/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:39.594 [print] {
"resourceType": "Observation",
"id": "14220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:44.256+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
> *
print COOKIES
09:49:39.594 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:39.596 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:39.596 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lDMXs81Uxjwymv0M"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14220/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14220/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:39.596 [print] {
"resourceType": "Observation",
"id": "14220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:44.256+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
> *
print COOKIES
09:49:39.596 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:40.479 [print] {
"resourceType": "Observation",
"id": "14220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:44.256+02:00",
"source": "#lDMXs81Uxjwymv0M",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:41.085 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:41.720 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:45.751+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:45.751+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:41.720 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:42.361 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:42.361 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8WMH1V2AGAPz2SV0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14221/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14221/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:42.361 [print] {
"resourceType": "Observation",
"id": "14221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:47.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
> *
print COOKIES
09:49:42.361 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:42.361 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:42.361 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8WMH1V2AGAPz2SV0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14221/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14221/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:42.361 [print] {
"resourceType": "Observation",
"id": "14221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:47.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
> *
print COOKIES
09:49:42.361 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:42.970 [print] {
"resourceType": "Observation",
"id": "14221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:47.031+02:00",
"source": "#8WMH1V2AGAPz2SV0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:43.604 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:44.201 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:48.274+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:48.274+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:44.201 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:44.848 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:44.848 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DpWCxowDAYjiE1VD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14222/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14222/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:44.848 [print] {
"resourceType": "Observation",
"id": "14222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:49.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
> *
print COOKIES
09:49:44.848 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:44.855 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:44.855 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DpWCxowDAYjiE1VD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14222/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14222/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:44.855 [print] {
"resourceType": "Observation",
"id": "14222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:49.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
> *
print COOKIES
09:49:44.855 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:45.457 [print] {
"resourceType": "Observation",
"id": "14222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:49.496+02:00",
"source": "#DpWCxowDAYjiE1VD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:46.045 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:46.652 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:50.717+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:50.717+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:46.654 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:47.287 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:47.287 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4ri11GkZn7WatBMf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14223/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14223/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:47.287 [print] {
"resourceType": "Observation",
"id": "14223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:51.951+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
> *
print COOKIES
09:49:47.287 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:47.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:47.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4ri11GkZn7WatBMf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14223/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14223/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:47.290 [print] {
"resourceType": "Observation",
"id": "14223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:51.951+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
> *
print COOKIES
09:49:47.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:47.904 [print] {
"resourceType": "Observation",
"id": "14223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:51.951+02:00",
"source": "#4ri11GkZn7WatBMf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:48.744 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:49.373 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:53.401+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:53.401+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:49.373 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-09-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:49.987 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:49.987 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wa0FnXx0dfcettSH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14224/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14224/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:49.987 [print] {
"resourceType": "Observation",
"id": "14224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:54.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-09-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
> *
print COOKIES
09:49:49.987 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:49.991 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:49.991 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wa0FnXx0dfcettSH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14224/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14224/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:49.991 [print] {
"resourceType": "Observation",
"id": "14224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:54.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-09-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
> *
print COOKIES
09:49:49.991 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:50.539 [print] {
"resourceType": "Observation",
"id": "14224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:54.650+02:00",
"source": "#wa0FnXx0dfcettSH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-09-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:51.165 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:51.772 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:55.835+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:55.835+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:51.788 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:53.390 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:53.390 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TbNeFDzxn2nnFEJZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14225/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14225/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:53.390 [print] {
"resourceType": "Observation",
"id": "14225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:58.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
> *
print COOKIES
09:49:53.390 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:53.390 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:53.390 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TbNeFDzxn2nnFEJZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14225/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:49:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14225/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:49:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:53.390 [print] {
"resourceType": "Observation",
"id": "14225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:58.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
> *
print COOKIES
09:49:53.390 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:54.008 [print] {
"resourceType": "Observation",
"id": "14225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:49:58.065+02:00",
"source": "#TbNeFDzxn2nnFEJZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:49:54.590 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:49:58.519 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:49:59.250+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:49:59.250+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:49:58.519 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:59.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:59.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QVj5Zjz4DcoRVuAl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14226/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14226/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:59.113 [print] {
"resourceType": "Observation",
"id": "14226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:03.779+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
> *
print COOKIES
09:49:59.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:49:59.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:49:59.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QVj5Zjz4DcoRVuAl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14226/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14226/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:49:59.113 [print] {
"resourceType": "Observation",
"id": "14226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:03.779+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
> *
print COOKIES
09:49:59.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:49:59.785 [print] {
"resourceType": "Observation",
"id": "14226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:03.779+02:00",
"source": "#QVj5Zjz4DcoRVuAl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:00.370 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:00.987 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:05.040+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:05.040+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:00.987 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:01.887 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:01.887 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zhSX7ukydcSHgKXd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14227/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14227/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:01.887 [print] {
"resourceType": "Observation",
"id": "14227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:06.552+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
> *
print COOKIES
09:50:01.887 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:01.887 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:01.887 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zhSX7ukydcSHgKXd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14227/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14227/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:01.887 [print] {
"resourceType": "Observation",
"id": "14227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:06.552+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
> *
print COOKIES
09:50:01.887 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:02.524 [print] {
"resourceType": "Observation",
"id": "14227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:06.552+02:00",
"source": "#zhSX7ukydcSHgKXd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:03.373 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:05.986 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:08.036+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:08.036+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:05.986 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:06.641 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:06.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rtoYLoLBj6BNjcRK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14228/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14228/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:06.641 [print] {
"resourceType": "Observation",
"id": "14228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:11.285+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
> *
print COOKIES
09:50:06.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:06.643 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:06.643 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rtoYLoLBj6BNjcRK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14228/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14228/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:06.643 [print] {
"resourceType": "Observation",
"id": "14228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:11.285+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
> *
print COOKIES
09:50:06.643 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:07.247 [print] {
"resourceType": "Observation",
"id": "14228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:11.285+02:00",
"source": "#rtoYLoLBj6BNjcRK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:07.837 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:08.471 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:12.501+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:12.501+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:08.486 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:09.101 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:09.101 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJwn5Ty6iUF5yBQF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14229/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14229/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:09.101 [print] {
"resourceType": "Observation",
"id": "14229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:13.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
> *
print COOKIES
09:50:09.101 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:09.103 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:09.103 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJwn5Ty6iUF5yBQF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14229/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14229/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:09.103 [print] {
"resourceType": "Observation",
"id": "14229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:13.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
> *
print COOKIES
09:50:09.103 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:09.756 [print] {
"resourceType": "Observation",
"id": "14229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:13.758+02:00",
"source": "#KJwn5Ty6iUF5yBQF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:10.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:11.169 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:15.259+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:15.259+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:11.169 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "88",
"display": "(c.6) Malignant gonadal tumors of mixed forms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:11.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:11.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"maSPpMTOJmsOFdmU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14230/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14230/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:11.775 [print] {
"resourceType": "Observation",
"id": "14230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:16.425+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "88",
"display": "(c.6) Malignant gonadal tumors of mixed forms"
}
]
}
}
> *
print COOKIES
09:50:11.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:11.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:11.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"maSPpMTOJmsOFdmU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14230/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14230/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:11.777 [print] {
"resourceType": "Observation",
"id": "14230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:16.425+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "88",
"display": "(c.6) Malignant gonadal tumors of mixed forms"
}
]
}
}
> *
print COOKIES
09:50:11.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:12.410 [print] {
"resourceType": "Observation",
"id": "14230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:16.425+02:00",
"source": "#maSPpMTOJmsOFdmU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "88",
"display": "(c.6) Malignant gonadal tumors of mixed forms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:13.045 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:13.712 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:17.671+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:17.671+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:13.713 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-04-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "80",
"display": "(b.4) Yolk sac tumor of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:14.615 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"568"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:14.615 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ckOaGHEBSAC5Qhwa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14231/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14231/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:14.615 [print] {
"resourceType": "Observation",
"id": "14231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:19.273+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-04-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "80",
"display": "(b.4) Yolk sac tumor of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:50:14.615 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:14.617 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"568"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:14.617 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ckOaGHEBSAC5Qhwa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14231/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14231/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:14.617 [print] {
"resourceType": "Observation",
"id": "14231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:19.273+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-04-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "80",
"display": "(b.4) Yolk sac tumor of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:50:14.617 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:15.201 [print] {
"resourceType": "Observation",
"id": "14231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:19.273+02:00",
"source": "#ckOaGHEBSAC5Qhwa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-04-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "80",
"display": "(b.4) Yolk sac tumor of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:15.837 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:16.872 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:20.496+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:20.496+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:16.873 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "69",
"display": "(d.11) Miscellaneous soft tissue sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:17.475 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:17.475 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ab2EN0Ei23JKrtoS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14232/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14232/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:17.475 [print] {
"resourceType": "Observation",
"id": "14232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:22.135+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "69",
"display": "(d.11) Miscellaneous soft tissue sarcomas"
}
]
}
}
> *
print COOKIES
09:50:17.475 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:17.477 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:17.477 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ab2EN0Ei23JKrtoS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14232/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14232/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:17.477 [print] {
"resourceType": "Observation",
"id": "14232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:22.135+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "69",
"display": "(d.11) Miscellaneous soft tissue sarcomas"
}
]
}
}
> *
print COOKIES
09:50:17.477 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:18.064 [print] {
"resourceType": "Observation",
"id": "14232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:22.135+02:00",
"source": "#ab2EN0Ei23JKrtoS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "69",
"display": "(d.11) Miscellaneous soft tissue sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:18.671 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:19.551 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:23.324+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:23.324+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:19.552 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:20.366 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:20.366 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qmoq8J9la4vtVWxn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14233/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14233/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:20.366 [print] {
"resourceType": "Observation",
"id": "14233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:25.030+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
> *
print COOKIES
09:50:20.366 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:20.368 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:20.368 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qmoq8J9la4vtVWxn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14233/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14233/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:20.368 [print] {
"resourceType": "Observation",
"id": "14233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:25.030+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
> *
print COOKIES
09:50:20.368 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:20.941 [print] {
"resourceType": "Observation",
"id": "14233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:25.030+02:00",
"source": "#qmoq8J9la4vtVWxn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:22.326 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:22.900 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:26.995+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:26.995+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:22.900 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "111",
"display": "(a.4) Other complex mixed and stromal neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:23.507 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:23.507 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mj8kgqrZaXIrd7M2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14234/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14234/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:23.507 [print] {
"resourceType": "Observation",
"id": "14234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:28.163+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "111",
"display": "(a.4) Other complex mixed and stromal neoplasms"
}
]
}
}
> *
print COOKIES
09:50:23.507 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:23.509 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:23.509 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mj8kgqrZaXIrd7M2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14234/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14234/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:23.509 [print] {
"resourceType": "Observation",
"id": "14234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:28.163+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "111",
"display": "(a.4) Other complex mixed and stromal neoplasms"
}
]
}
}
> *
print COOKIES
09:50:23.509 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:24.107 [print] {
"resourceType": "Observation",
"id": "14234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:28.163+02:00",
"source": "#mj8kgqrZaXIrd7M2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "111",
"display": "(a.4) Other complex mixed and stromal neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:24.764 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:25.748 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:29.432+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:29.432+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:25.750 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:26.372 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:26.372 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Py8gU3DJlmfJAqDc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14235/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14235/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:26.372 [print] {
"resourceType": "Observation",
"id": "14235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:30.989+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
> *
print COOKIES
09:50:26.372 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:26.377 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:26.377 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Py8gU3DJlmfJAqDc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14235/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14235/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:26.377 [print] {
"resourceType": "Observation",
"id": "14235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:30.989+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
> *
print COOKIES
09:50:26.377 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:27.682 [print] {
"resourceType": "Observation",
"id": "14235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:30.989+02:00",
"source": "#Py8gU3DJlmfJAqDc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:28.302 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:29.140 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:32.972+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:32.972+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:29.141 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:29.735 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:29.736 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vNl8deWHDXRmGwAy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14236/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14236/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:29.736 [print] {
"resourceType": "Observation",
"id": "14236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:34.400+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
09:50:29.736 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:29.738 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:29.738 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vNl8deWHDXRmGwAy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14236/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14236/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:29.738 [print] {
"resourceType": "Observation",
"id": "14236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:34.400+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
09:50:29.738 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:30.342 [print] {
"resourceType": "Observation",
"id": "14236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:34.400+02:00",
"source": "#vNl8deWHDXRmGwAy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:30.970 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:31.608 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:35.641+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:35.641+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:31.608 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:32.435 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"519"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:32.435 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bbxiFTNDuMfIPFTW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14237/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14237/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:32.435 [print] {
"resourceType": "Observation",
"id": "14237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:36.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
> *
print COOKIES
09:50:32.435 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:32.435 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"519"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:32.435 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bbxiFTNDuMfIPFTW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14237/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14237/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:32.435 [print] {
"resourceType": "Observation",
"id": "14237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:36.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
> *
print COOKIES
09:50:32.435 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:33.249 [print] {
"resourceType": "Observation",
"id": "14237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:36.933+02:00",
"source": "#bbxiFTNDuMfIPFTW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:34.902 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:35.550 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:39.571+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:39.571+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:35.550 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:36.193 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:36.193 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DYSYOrw2VvQz7FMv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14238/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14238/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:36.193 [print] {
"resourceType": "Observation",
"id": "14238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:40.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
> *
print COOKIES
09:50:36.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:36.193 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:36.193 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DYSYOrw2VvQz7FMv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14238/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14238/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:36.193 [print] {
"resourceType": "Observation",
"id": "14238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:40.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
> *
print COOKIES
09:50:36.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:38.089 [print] {
"resourceType": "Observation",
"id": "14238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:40.852+02:00",
"source": "#DYSYOrw2VvQz7FMv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:39.752 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:40.387 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:44.421+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:44.421+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:40.389 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:41.224 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:41.224 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eqWo0tLRx6jGA9cQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14239/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14239/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:41.224 [print] {
"resourceType": "Observation",
"id": "14239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:45.886+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
> *
print COOKIES
09:50:41.224 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:41.227 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:41.227 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eqWo0tLRx6jGA9cQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14239/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14239/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:41.227 [print] {
"resourceType": "Observation",
"id": "14239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:45.886+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
> *
print COOKIES
09:50:41.227 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:41.807 [print] {
"resourceType": "Observation",
"id": "14239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:45.886+02:00",
"source": "#eqWo0tLRx6jGA9cQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:42.486 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:43.172 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:47.151+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:47.151+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:43.172 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "113",
"display": "(a.6) Other specified malignant tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:43.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:43.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O8vYdao0u6eC9UqH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14240/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14240/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:43.779 [print] {
"resourceType": "Observation",
"id": "14240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:48.452+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "113",
"display": "(a.6) Other specified malignant tumors"
}
]
}
}
> *
print COOKIES
09:50:43.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:43.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:43.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O8vYdao0u6eC9UqH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14240/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14240/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:43.779 [print] {
"resourceType": "Observation",
"id": "14240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:48.452+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "113",
"display": "(a.6) Other specified malignant tumors"
}
]
}
}
> *
print COOKIES
09:50:43.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:44.779 [print] {
"resourceType": "Observation",
"id": "14240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:48.452+02:00",
"source": "#O8vYdao0u6eC9UqH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "113",
"display": "(a.6) Other specified malignant tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:45.389 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:45.986 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:50.055+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:50.055+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:45.986 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "102",
"display": "(f.6) Carcinomas of breast"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:47.652 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:47.652 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IKPPQ3oRNHu7JCtl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14241/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14241/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:47.652 [print] {
"resourceType": "Observation",
"id": "14241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:52.313+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "102",
"display": "(f.6) Carcinomas of breast"
}
]
}
}
> *
print COOKIES
09:50:47.652 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:47.667 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:47.667 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IKPPQ3oRNHu7JCtl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14241/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14241/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:47.667 [print] {
"resourceType": "Observation",
"id": "14241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:52.313+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "102",
"display": "(f.6) Carcinomas of breast"
}
]
}
}
> *
print COOKIES
09:50:47.667 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:48.267 [print] {
"resourceType": "Observation",
"id": "14241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:52.313+02:00",
"source": "#IKPPQ3oRNHu7JCtl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "102",
"display": "(f.6) Carcinomas of breast"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:48.881 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:49.483 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:53.553+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:53.553+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:49.499 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:50.346 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:50.346 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jGO2wul5gkiHu8KP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14242/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14242/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:50.346 [print] {
"resourceType": "Observation",
"id": "14242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:55.013+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
> *
print COOKIES
09:50:50.346 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:50.346 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:50.346 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jGO2wul5gkiHu8KP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14242/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14242/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:50.346 [print] {
"resourceType": "Observation",
"id": "14242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:55.013+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
> *
print COOKIES
09:50:50.346 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:50.932 [print] {
"resourceType": "Observation",
"id": "14242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:55.013+02:00",
"source": "#jGO2wul5gkiHu8KP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:51.568 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:52.186 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:56.223+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:56.223+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:52.186 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:52.785 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:52.785 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JZXTN8txJOuGN39E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14243/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14243/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:52.785 [print] {
"resourceType": "Observation",
"id": "14243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:57.449+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
> *
print COOKIES
09:50:52.785 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:52.785 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:52.785 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JZXTN8txJOuGN39E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14243/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:50:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14243/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:50:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:52.785 [print] {
"resourceType": "Observation",
"id": "14243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:57.449+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
> *
print COOKIES
09:50:52.785 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:53.698 [print] {
"resourceType": "Observation",
"id": "14243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:50:57.449+02:00",
"source": "#JZXTN8txJOuGN39E",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:54.345 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:54.987 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:50:59.014+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:50:59.014+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:54.987 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:55.866 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:55.866 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WHU7yeaDxb6ZPu6l"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14244/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14244/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:55.866 [print] {
"resourceType": "Observation",
"id": "14244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:00.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
> *
print COOKIES
09:50:55.866 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:55.883 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:55.883 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WHU7yeaDxb6ZPu6l"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14244/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14244/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:55.883 [print] {
"resourceType": "Observation",
"id": "14244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:00.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
> *
print COOKIES
09:50:55.883 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:56.470 [print] {
"resourceType": "Observation",
"id": "14244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:00.530+02:00",
"source": "#WHU7yeaDxb6ZPu6l",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:57.092 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:50:58.130 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:01.734+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:01.734+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:50:58.145 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "97",
"display": "(f.1) Carcinomas of salivary glands"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:58.783 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"544"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:58.783 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fvdMiYIpEXHsrxYQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14245/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14245/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:58.783 [print] {
"resourceType": "Observation",
"id": "14245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:03.445+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "97",
"display": "(f.1) Carcinomas of salivary glands"
}
]
}
}
> *
print COOKIES
09:50:58.783 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:50:58.783 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"544"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:50:58.783 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fvdMiYIpEXHsrxYQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14245/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14245/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:50:58.783 [print] {
"resourceType": "Observation",
"id": "14245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:03.445+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "97",
"display": "(f.1) Carcinomas of salivary glands"
}
]
}
}
> *
print COOKIES
09:50:58.783 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:50:59.382 [print] {
"resourceType": "Observation",
"id": "14245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:03.445+02:00",
"source": "#fvdMiYIpEXHsrxYQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "97",
"display": "(f.1) Carcinomas of salivary glands"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:50:59.968 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:00.602 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:04.645+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:04.645+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:00.602 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "79",
"display": "(b.3) Embryonal carcinomas of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:01.451 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:01.451 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mKUGcuJxgJoGE8kr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14246/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14246/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:01.451 [print] {
"resourceType": "Observation",
"id": "14246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:05.906+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "79",
"display": "(b.3) Embryonal carcinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:51:01.451 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:01.453 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:01.453 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mKUGcuJxgJoGE8kr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14246/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14246/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:01.453 [print] {
"resourceType": "Observation",
"id": "14246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:05.906+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "79",
"display": "(b.3) Embryonal carcinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:51:01.453 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:02.098 [print] {
"resourceType": "Observation",
"id": "14246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:05.906+02:00",
"source": "#mKUGcuJxgJoGE8kr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "79",
"display": "(b.3) Embryonal carcinomas of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:02.768 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:03.400 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:07.438+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:07.438+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:03.416 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:03.986 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:03.986 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fgJAUP83HQpjldIa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14247/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14247/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:03.986 [print] {
"resourceType": "Observation",
"id": "14247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:08.655+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
> *
print COOKIES
09:51:03.986 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:03.988 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:03.988 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fgJAUP83HQpjldIa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14247/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14247/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:03.988 [print] {
"resourceType": "Observation",
"id": "14247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:08.655+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
> *
print COOKIES
09:51:03.988 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:04.561 [print] {
"resourceType": "Observation",
"id": "14247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:08.655+02:00",
"source": "#fgJAUP83HQpjldIa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:05.805 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:06.426 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:10.478+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:10.478+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:06.426 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:07.047 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:07.047 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NYbfBNG3W4Au553F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14248/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14248/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:07.047 [print] {
"resourceType": "Observation",
"id": "14248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:11.719+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
> *
print COOKIES
09:51:07.047 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:07.047 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:07.047 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NYbfBNG3W4Au553F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14248/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14248/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:07.047 [print] {
"resourceType": "Observation",
"id": "14248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:11.719+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
> *
print COOKIES
09:51:07.047 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:07.702 [print] {
"resourceType": "Observation",
"id": "14248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:11.719+02:00",
"source": "#NYbfBNG3W4Au553F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:08.337 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:08.924 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:13.004+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:13.004+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:08.925 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "40",
"display": "(b) Renal carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:09.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:09.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Rfie3ky4wDbSl41p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14249/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14249/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:09.553 [print] {
"resourceType": "Observation",
"id": "14249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:14.217+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "40",
"display": "(b) Renal carcinomas"
}
]
}
}
> *
print COOKIES
09:51:09.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:09.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:09.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Rfie3ky4wDbSl41p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14249/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14249/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:09.553 [print] {
"resourceType": "Observation",
"id": "14249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:14.217+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "40",
"display": "(b) Renal carcinomas"
}
]
}
}
> *
print COOKIES
09:51:09.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:10.983 [print] {
"resourceType": "Observation",
"id": "14249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:14.217+02:00",
"source": "#Rfie3ky4wDbSl41p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "40",
"display": "(b) Renal carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:11.605 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:12.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:16.274+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:16.274+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:12.183 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "87",
"display": "(c.5) Gonadal choriocarcinoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:12.774 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:12.774 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5Cv3PO0HDjfybADD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14250/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14250/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:12.774 [print] {
"resourceType": "Observation",
"id": "14250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:17.440+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "87",
"display": "(c.5) Gonadal choriocarcinoma"
}
]
}
}
> *
print COOKIES
09:51:12.774 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:12.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:12.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5Cv3PO0HDjfybADD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14250/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14250/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:12.777 [print] {
"resourceType": "Observation",
"id": "14250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:17.440+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "87",
"display": "(c.5) Gonadal choriocarcinoma"
}
]
}
}
> *
print COOKIES
09:51:12.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:13.354 [print] {
"resourceType": "Observation",
"id": "14250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:17.440+02:00",
"source": "#5Cv3PO0HDjfybADD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "87",
"display": "(c.5) Gonadal choriocarcinoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:13.965 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:14.579 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:18.636+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:18.636+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:14.579 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "98",
"display": "(f.2) Carcinomas of colon and rectum"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:15.170 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"545"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:15.170 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iMxHz2NoAt7wAknQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14251/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14251/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:15.170 [print] {
"resourceType": "Observation",
"id": "14251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:19.822+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "98",
"display": "(f.2) Carcinomas of colon and rectum"
}
]
}
}
> *
print COOKIES
09:51:15.170 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:15.173 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"545"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:15.173 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iMxHz2NoAt7wAknQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14251/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14251/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:15.173 [print] {
"resourceType": "Observation",
"id": "14251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:19.822+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "98",
"display": "(f.2) Carcinomas of colon and rectum"
}
]
}
}
> *
print COOKIES
09:51:15.173 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:15.815 [print] {
"resourceType": "Observation",
"id": "14251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:19.822+02:00",
"source": "#iMxHz2NoAt7wAknQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "98",
"display": "(f.2) Carcinomas of colon and rectum"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:17.251 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:17.828 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:21.917+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:21.917+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:17.828 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:18.446 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:18.446 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QBic9je2e0O5TkX2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14252/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14252/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:18.447 [print] {
"resourceType": "Observation",
"id": "14252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:23.109+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
> *
print COOKIES
09:51:18.447 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:18.448 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:18.448 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QBic9je2e0O5TkX2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14252/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14252/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:18.448 [print] {
"resourceType": "Observation",
"id": "14252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:23.109+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
> *
print COOKIES
09:51:18.448 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:19.052 [print] {
"resourceType": "Observation",
"id": "14252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:23.109+02:00",
"source": "#QBic9je2e0O5TkX2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:19.624 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:20.277 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:24.310+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:24.310+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:20.277 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:20.912 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:20.912 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LKHuL1WpsTLVgC3I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14253/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14253/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:20.912 [print] {
"resourceType": "Observation",
"id": "14253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:25.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
> *
print COOKIES
09:51:20.912 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:20.914 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:20.914 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LKHuL1WpsTLVgC3I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14253/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14253/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:20.914 [print] {
"resourceType": "Observation",
"id": "14253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:25.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
> *
print COOKIES
09:51:20.914 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:21.514 [print] {
"resourceType": "Observation",
"id": "14253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:25.565+02:00",
"source": "#LKHuL1WpsTLVgC3I",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:22.483 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:24.068 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:27.151+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:27.151+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:24.068 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:24.653 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"555"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:24.653 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GGajXUcpzxdTdw15"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14254/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14254/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:24.653 [print] {
"resourceType": "Observation",
"id": "14254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:29.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
> *
print COOKIES
09:51:24.653 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:24.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"555"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:24.655 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GGajXUcpzxdTdw15"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14254/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14254/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:24.655 [print] {
"resourceType": "Observation",
"id": "14254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:29.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
> *
print COOKIES
09:51:24.655 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:25.297 [print] {
"resourceType": "Observation",
"id": "14254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:29.322+02:00",
"source": "#GGajXUcpzxdTdw15",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:25.942 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:26.555 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:30.593+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:30.593+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:26.555 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:27.306 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:27.306 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1X1kklMOUFWKExXD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14255/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14255/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:27.306 [print] {
"resourceType": "Observation",
"id": "14255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:31.830+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
> *
print COOKIES
09:51:27.306 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:27.306 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:27.306 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1X1kklMOUFWKExXD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14255/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14255/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:27.306 [print] {
"resourceType": "Observation",
"id": "14255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:31.830+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
> *
print COOKIES
09:51:27.306 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:27.949 [print] {
"resourceType": "Observation",
"id": "14255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:31.830+02:00",
"source": "#1X1kklMOUFWKExXD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:28.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:29.164 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:33.250+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:33.250+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:29.179 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:30.091 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:30.091 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v8K9jh4Te8A5qVnA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14256/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14256/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:30.091 [print] {
"resourceType": "Observation",
"id": "14256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:34.745+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
> *
print COOKIES
09:51:30.091 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:30.093 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:30.093 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v8K9jh4Te8A5qVnA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14256/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14256/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:30.093 [print] {
"resourceType": "Observation",
"id": "14256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:34.745+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
> *
print COOKIES
09:51:30.093 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:30.706 [print] {
"resourceType": "Observation",
"id": "14256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:34.745+02:00",
"source": "#v8K9jh4Te8A5qVnA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:31.376 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:32.063 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:36.031+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:36.031+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:32.063 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:32.870 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:32.870 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ii8eXjwjgLhgWt3q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14257/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14257/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:32.870 [print] {
"resourceType": "Observation",
"id": "14257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:37.528+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
> *
print COOKIES
09:51:32.870 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:32.872 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:32.873 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ii8eXjwjgLhgWt3q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14257/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14257/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:32.873 [print] {
"resourceType": "Observation",
"id": "14257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:37.528+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
> *
print COOKIES
09:51:32.873 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:33.453 [print] {
"resourceType": "Observation",
"id": "14257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:37.528+02:00",
"source": "#ii8eXjwjgLhgWt3q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:34.167 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:35.032 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:38.850+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:38.850+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:35.032 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "70",
"display": "(e) Unspecified soft tissue sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:35.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"545"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:35.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bBBHjq8UCYwlYX44"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14258/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14258/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:35.634 [print] {
"resourceType": "Observation",
"id": "14258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:40.316+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "70",
"display": "(e) Unspecified soft tissue sarcomas"
}
]
}
}
> *
print COOKIES
09:51:35.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:35.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"545"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:35.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bBBHjq8UCYwlYX44"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14258/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14258/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:35.634 [print] {
"resourceType": "Observation",
"id": "14258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:40.316+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "70",
"display": "(e) Unspecified soft tissue sarcomas"
}
]
}
}
> *
print COOKIES
09:51:35.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:36.266 [print] {
"resourceType": "Observation",
"id": "14258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:40.316+02:00",
"source": "#bBBHjq8UCYwlYX44",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "70",
"display": "(e) Unspecified soft tissue sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:36.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:37.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:41.544+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:41.544+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:37.557 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:38.442 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:38.442 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JY81XpWQCtJazL4B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14259/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14259/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:38.442 [print] {
"resourceType": "Observation",
"id": "14259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:43.108+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
> *
print COOKIES
09:51:38.442 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:38.444 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:38.444 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JY81XpWQCtJazL4B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14259/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14259/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:38.444 [print] {
"resourceType": "Observation",
"id": "14259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:43.108+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
> *
print COOKIES
09:51:38.444 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:39.036 [print] {
"resourceType": "Observation",
"id": "14259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:43.108+02:00",
"source": "#JY81XpWQCtJazL4B",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:39.646 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:41.296 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:44.299+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:44.299+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:41.297 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "114",
"display": "(b) Other unspecified malignant tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:42.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:42.048 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oBHIcsTofA8kNFYK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14260/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14260/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:42.048 [print] {
"resourceType": "Observation",
"id": "14260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:46.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "114",
"display": "(b) Other unspecified malignant tumors"
}
]
}
}
> *
print COOKIES
09:51:42.048 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:42.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:42.048 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oBHIcsTofA8kNFYK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14260/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14260/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:42.048 [print] {
"resourceType": "Observation",
"id": "14260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:46.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "114",
"display": "(b) Other unspecified malignant tumors"
}
]
}
}
> *
print COOKIES
09:51:42.048 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:42.783 [print] {
"resourceType": "Observation",
"id": "14260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:46.711+02:00",
"source": "#oBHIcsTofA8kNFYK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "114",
"display": "(b) Other unspecified malignant tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:43.377 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:44.080 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:48.052+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:48.052+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:44.081 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:44.648 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:44.648 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SfBwbmoWQ14LHhc2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14261/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14261/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:44.648 [print] {
"resourceType": "Observation",
"id": "14261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:49.318+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
> *
print COOKIES
09:51:44.648 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:44.650 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:44.650 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SfBwbmoWQ14LHhc2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14261/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14261/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:44.650 [print] {
"resourceType": "Observation",
"id": "14261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:49.318+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
> *
print COOKIES
09:51:44.650 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:45.231 [print] {
"resourceType": "Observation",
"id": "14261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:49.318+02:00",
"source": "#SfBwbmoWQ14LHhc2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:46.103 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:46.739 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:50.790+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:50.790+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:46.741 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:47.331 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:47.331 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8WckGalmIrjLuVMl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14262/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14262/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:47.331 [print] {
"resourceType": "Observation",
"id": "14262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:51.990+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
> *
print COOKIES
09:51:47.331 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:47.331 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:47.331 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8WckGalmIrjLuVMl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14262/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14262/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:47.331 [print] {
"resourceType": "Observation",
"id": "14262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:51.990+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
> *
print COOKIES
09:51:47.331 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:48.147 [print] {
"resourceType": "Observation",
"id": "14262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:51.990+02:00",
"source": "#8WckGalmIrjLuVMl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:48.785 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:49.400 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:53.431+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:53.431+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:49.412 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "46",
"display": "(b) Chondrosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:50.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:50.048 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KAxW3ITOjff4hSDW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14263/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14263/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:50.048 [print] {
"resourceType": "Observation",
"id": "14263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:54.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "46",
"display": "(b) Chondrosarcomas"
}
]
}
}
> *
print COOKIES
09:51:50.048 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:50.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:50.048 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KAxW3ITOjff4hSDW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14263/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14263/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:50.048 [print] {
"resourceType": "Observation",
"id": "14263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:54.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "46",
"display": "(b) Chondrosarcomas"
}
]
}
}
> *
print COOKIES
09:51:50.048 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:50.680 [print] {
"resourceType": "Observation",
"id": "14263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:54.714+02:00",
"source": "#KAxW3ITOjff4hSDW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "46",
"display": "(b) Chondrosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:51.303 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:52.114 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:55.969+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:55.969+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:52.114 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:52.789 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:52.789 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C8WimUbL7gY21V4J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14264/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14264/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:52.789 [print] {
"resourceType": "Observation",
"id": "14264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:57.460+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
> *
print COOKIES
09:51:52.789 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:52.805 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:52.805 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C8WimUbL7gY21V4J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14264/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:51:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14264/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:52.805 [print] {
"resourceType": "Observation",
"id": "14264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:57.460+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
> *
print COOKIES
09:51:52.805 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:53.406 [print] {
"resourceType": "Observation",
"id": "14264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:51:57.460+02:00",
"source": "#C8WimUbL7gY21V4J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:54.053 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:54.688 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:51:58.724+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:51:58.724+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:54.689 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:55.494 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:55.494 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XPMPyPJ1tW8XhhfO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14265/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14265/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:55.494 [print] {
"resourceType": "Observation",
"id": "14265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:00.165+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
> *
print COOKIES
09:51:55.494 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:55.494 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:55.494 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XPMPyPJ1tW8XhhfO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14265/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14265/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:51:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:55.494 [print] {
"resourceType": "Observation",
"id": "14265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:00.165+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
> *
print COOKIES
09:51:55.494 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:56.188 [print] {
"resourceType": "Observation",
"id": "14265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:00.165+02:00",
"source": "#XPMPyPJ1tW8XhhfO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:56.797 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:51:57.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:01.469+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:01.469+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:51:57.417 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "76",
"display": "(a.6) Intracranial and intraspinal tumors of mixed forms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:58.097 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"565"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:58.097 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZkyiC15hue0Fa5J3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14266/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14266/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:58.097 [print] {
"resourceType": "Observation",
"id": "14266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:02.730+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "76",
"display": "(a.6) Intracranial and intraspinal tumors of mixed forms"
}
]
}
}
> *
print COOKIES
09:51:58.097 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:51:58.099 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"565"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:51:58.099 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZkyiC15hue0Fa5J3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14266/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14266/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:51:58.099 [print] {
"resourceType": "Observation",
"id": "14266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:02.730+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "76",
"display": "(a.6) Intracranial and intraspinal tumors of mixed forms"
}
]
}
}
> *
print COOKIES
09:51:58.099 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:51:58.896 [print] {
"resourceType": "Observation",
"id": "14266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:02.730+02:00",
"source": "#ZkyiC15hue0Fa5J3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "76",
"display": "(a.6) Intracranial and intraspinal tumors of mixed forms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:51:59.481 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:00.113 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:04.168+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:04.168+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:00.113 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:00.715 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:00.715 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ulne8UHJhHZEABJS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14267/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14267/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:00.715 [print] {
"resourceType": "Observation",
"id": "14267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:05.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
> *
print COOKIES
09:52:00.715 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:00.731 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:00.731 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ulne8UHJhHZEABJS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14267/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14267/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:00.731 [print] {
"resourceType": "Observation",
"id": "14267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:05.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
> *
print COOKIES
09:52:00.731 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:01.401 [print] {
"resourceType": "Observation",
"id": "14267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:05.399+02:00",
"source": "#Ulne8UHJhHZEABJS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:02.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:02.651 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:06.712+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:06.712+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:02.651 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:03.263 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:03.263 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Mk2zfcufWbTtirew"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14268/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14268/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:03.263 [print] {
"resourceType": "Observation",
"id": "14268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:07.936+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
09:52:03.263 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:03.263 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:03.263 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Mk2zfcufWbTtirew"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14268/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14268/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:03.263 [print] {
"resourceType": "Observation",
"id": "14268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:07.936+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
09:52:03.263 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:03.860 [print] {
"resourceType": "Observation",
"id": "14268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:07.936+02:00",
"source": "#Mk2zfcufWbTtirew",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:04.698 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:05.315 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:09.373+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:09.373+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:05.315 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:05.932 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:05.932 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9XjzH70zSxZi7TH8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14269/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14269/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:05.932 [print] {
"resourceType": "Observation",
"id": "14269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:10.604+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
> *
print COOKIES
09:52:05.932 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:05.932 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:05.932 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9XjzH70zSxZi7TH8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14269/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14269/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:05.932 [print] {
"resourceType": "Observation",
"id": "14269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:10.604+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
> *
print COOKIES
09:52:05.932 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:06.553 [print] {
"resourceType": "Observation",
"id": "14269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:10.604+02:00",
"source": "#9XjzH70zSxZi7TH8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:07.139 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:07.841 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:11.819+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:11.819+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:07.841 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:08.427 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:08.427 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rhDr7s31pNESmLna"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14270/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14270/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:08.427 [print] {
"resourceType": "Observation",
"id": "14270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:13.095+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
> *
print COOKIES
09:52:08.427 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:08.427 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:08.427 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rhDr7s31pNESmLna"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14270/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14270/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:08.427 [print] {
"resourceType": "Observation",
"id": "14270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:13.095+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
> *
print COOKIES
09:52:08.427 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:09.029 [print] {
"resourceType": "Observation",
"id": "14270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:13.095+02:00",
"source": "#rhDr7s31pNESmLna",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:09.662 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:10.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:14.342+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:14.342+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:10.333 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "112",
"display": "(a.5) Mesothelioma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:10.951 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:10.951 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HIE5lNip2r12D9zs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14271/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14271/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:10.951 [print] {
"resourceType": "Observation",
"id": "14271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:15.618+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "112",
"display": "(a.5) Mesothelioma"
}
]
}
}
> *
print COOKIES
09:52:10.951 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:10.966 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:10.966 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HIE5lNip2r12D9zs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14271/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14271/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:10.966 [print] {
"resourceType": "Observation",
"id": "14271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:15.618+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "112",
"display": "(a.5) Mesothelioma"
}
]
}
}
> *
print COOKIES
09:52:10.966 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:11.554 [print] {
"resourceType": "Observation",
"id": "14271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:15.618+02:00",
"source": "#HIE5lNip2r12D9zs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "112",
"display": "(a.5) Mesothelioma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:12.193 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:12.795 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:16.866+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:16.866+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:12.810 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:13.496 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:13.496 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kOjdd5S8hjgp3Xmo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14272/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14272/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:13.496 [print] {
"resourceType": "Observation",
"id": "14272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:18.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
> *
print COOKIES
09:52:13.496 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:13.496 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:13.496 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kOjdd5S8hjgp3Xmo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14272/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14272/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:13.496 [print] {
"resourceType": "Observation",
"id": "14272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:18.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
> *
print COOKIES
09:52:13.496 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:14.061 [print] {
"resourceType": "Observation",
"id": "14272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:18.153+02:00",
"source": "#kOjdd5S8hjgp3Xmo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:14.646 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:15.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:19.332+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:19.332+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:15.263 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:15.880 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:15.880 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MqYD6FXANBQAdyXN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14273/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14273/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:15.880 [print] {
"resourceType": "Observation",
"id": "14273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:20.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
> *
print COOKIES
09:52:15.880 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:15.896 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:15.896 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MqYD6FXANBQAdyXN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14273/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14273/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:15.896 [print] {
"resourceType": "Observation",
"id": "14273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:20.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
> *
print COOKIES
09:52:15.896 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:16.466 [print] {
"resourceType": "Observation",
"id": "14273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:20.565+02:00",
"source": "#MqYD6FXANBQAdyXN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:17.120 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:17.821 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:21.784+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:21.784+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:17.821 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:18.408 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:18.408 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RLlFvW716asVL4sa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14274/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14274/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:18.408 [print] {
"resourceType": "Observation",
"id": "14274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:23.082+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
> *
print COOKIES
09:52:18.408 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:18.408 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:18.408 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RLlFvW716asVL4sa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14274/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14274/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:18.408 [print] {
"resourceType": "Observation",
"id": "14274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:23.082+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
> *
print COOKIES
09:52:18.408 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:19.031 [print] {
"resourceType": "Observation",
"id": "14274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:23.082+02:00",
"source": "#RLlFvW716asVL4sa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:19.679 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 22ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 22ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:20.265 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:24.344+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:24.344+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:20.265 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:20.867 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:20.867 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ejUwqeXfGzGQef8W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14275/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14275/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:20.867 [print] {
"resourceType": "Observation",
"id": "14275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:25.536+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
> *
print COOKIES
09:52:20.867 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:20.867 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:20.867 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ejUwqeXfGzGQef8W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14275/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14275/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:20.867 [print] {
"resourceType": "Observation",
"id": "14275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:25.536+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
> *
print COOKIES
09:52:20.867 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:21.485 [print] {
"resourceType": "Observation",
"id": "14275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:25.536+02:00",
"source": "#ejUwqeXfGzGQef8W",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:22.102 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:22.994 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:26.773+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:26.773+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:22.994 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:23.611 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:23.611 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i2Lde5jbnCt8k35b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14276/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14276/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:23.611 [print] {
"resourceType": "Observation",
"id": "14276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:28.293+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
> *
print COOKIES
09:52:23.611 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:23.611 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:23.611 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i2Lde5jbnCt8k35b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14276/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14276/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:23.611 [print] {
"resourceType": "Observation",
"id": "14276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:28.293+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
> *
print COOKIES
09:52:23.611 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:24.227 [print] {
"resourceType": "Observation",
"id": "14276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:28.293+02:00",
"source": "#i2Lde5jbnCt8k35b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:24.854 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:25.448 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:29.527+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:29.527+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:25.450 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:26.066 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:26.066 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A4B44Gz0hg59LxNO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14277/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14277/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:26.067 [print] {
"resourceType": "Observation",
"id": "14277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:30.727+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
> *
print COOKIES
09:52:26.067 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:26.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:26.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A4B44Gz0hg59LxNO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14277/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14277/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:26.069 [print] {
"resourceType": "Observation",
"id": "14277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:30.727+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
> *
print COOKIES
09:52:26.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:26.646 [print] {
"resourceType": "Observation",
"id": "14277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:30.727+02:00",
"source": "#A4B44Gz0hg59LxNO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:27.541 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:28.162 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:32.215+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:32.215+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:28.163 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:28.768 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:28.768 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p3PVYCKkmuyFhiGp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14278/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14278/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:28.768 [print] {
"resourceType": "Observation",
"id": "14278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:33.439+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
> *
print COOKIES
09:52:28.768 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:28.770 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:28.770 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p3PVYCKkmuyFhiGp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14278/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14278/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:28.770 [print] {
"resourceType": "Observation",
"id": "14278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:33.439+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
> *
print COOKIES
09:52:28.770 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:29.785 [print] {
"resourceType": "Observation",
"id": "14278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:33.439+02:00",
"source": "#p3PVYCKkmuyFhiGp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:30.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:31.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:35.108+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:35.108+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:31.084 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-02-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:31.677 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"539"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:31.677 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qnNz8ZPcJZXFRsal"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14279/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14279/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:31.677 [print] {
"resourceType": "Observation",
"id": "14279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:36.346+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-02-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
> *
print COOKIES
09:52:31.677 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:31.678 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"539"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:31.679 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qnNz8ZPcJZXFRsal"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14279/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14279/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:31.679 [print] {
"resourceType": "Observation",
"id": "14279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:36.346+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-02-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
> *
print COOKIES
09:52:31.679 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:32.260 [print] {
"resourceType": "Observation",
"id": "14279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:36.346+02:00",
"source": "#qnNz8ZPcJZXFRsal",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-02-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:32.889 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:33.463 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:37.563+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:37.563+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:33.464 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:34.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:34.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"orjsEmLaAcgz5vxV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14280/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14280/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:34.069 [print] {
"resourceType": "Observation",
"id": "14280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:38.709+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
> *
print COOKIES
09:52:34.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:34.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:34.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"orjsEmLaAcgz5vxV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14280/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14280/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:34.069 [print] {
"resourceType": "Observation",
"id": "14280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:38.709+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
> *
print COOKIES
09:52:34.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:34.717 [print] {
"resourceType": "Observation",
"id": "14280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:38.709+02:00",
"source": "#orjsEmLaAcgz5vxV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:35.314 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:35.917 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:40.000+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:40.000+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:35.918 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:36.572 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:36.572 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"40EwDCADdvylyb31"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14281/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14281/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:36.572 [print] {
"resourceType": "Observation",
"id": "14281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:41.181+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
> *
print COOKIES
09:52:36.573 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:36.574 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:36.574 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"40EwDCADdvylyb31"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14281/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14281/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:36.574 [print] {
"resourceType": "Observation",
"id": "14281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:41.181+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
> *
print COOKIES
09:52:36.574 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:37.389 [print] {
"resourceType": "Observation",
"id": "14281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:41.181+02:00",
"source": "#40EwDCADdvylyb31",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:38.072 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:38.655 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:42.747+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:42.747+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:38.656 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "85",
"display": "(c.3) Gonadal embryonal carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:39.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:39.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zghiwQxRGci9AVVL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14282/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14282/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:39.305 [print] {
"resourceType": "Observation",
"id": "14282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:43.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "85",
"display": "(c.3) Gonadal embryonal carcinomas"
}
]
}
}
> *
print COOKIES
09:52:39.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:39.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:39.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zghiwQxRGci9AVVL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14282/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14282/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:39.307 [print] {
"resourceType": "Observation",
"id": "14282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:43.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "85",
"display": "(c.3) Gonadal embryonal carcinomas"
}
]
}
}
> *
print COOKIES
09:52:39.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:39.909 [print] {
"resourceType": "Observation",
"id": "14282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:43.937+02:00",
"source": "#zghiwQxRGci9AVVL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "85",
"display": "(c.3) Gonadal embryonal carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:40.563 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:41.152 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:45.215+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:45.215+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:41.153 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:41.786 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:41.786 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3AzHJ3mnGUiPz9I5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14283/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14283/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:41.786 [print] {
"resourceType": "Observation",
"id": "14283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:46.457+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
> *
print COOKIES
09:52:41.786 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:41.788 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:41.788 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3AzHJ3mnGUiPz9I5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14283/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14283/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:41.788 [print] {
"resourceType": "Observation",
"id": "14283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:46.457+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
> *
print COOKIES
09:52:41.788 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:42.403 [print] {
"resourceType": "Observation",
"id": "14283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:46.457+02:00",
"source": "#3AzHJ3mnGUiPz9I5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:43.039 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:43.664 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:47.711+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:47.711+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:43.666 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "105",
"display": "(f.9) Carcinomas of eye"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:44.282 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:44.282 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KxQf3GIyLPEmtIi3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14284/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14284/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:44.282 [print] {
"resourceType": "Observation",
"id": "14284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:48.924+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "105",
"display": "(f.9) Carcinomas of eye"
}
]
}
}
> *
print COOKIES
09:52:44.282 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:44.284 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:44.284 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KxQf3GIyLPEmtIi3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14284/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14284/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:44.284 [print] {
"resourceType": "Observation",
"id": "14284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:48.924+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "105",
"display": "(f.9) Carcinomas of eye"
}
]
}
}
> *
print COOKIES
09:52:44.284 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:44.890 [print] {
"resourceType": "Observation",
"id": "14284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:48.924+02:00",
"source": "#KxQf3GIyLPEmtIi3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "105",
"display": "(f.9) Carcinomas of eye"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:45.780 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:46.398 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:50.453+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:50.453+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:46.398 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:47.056 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"551"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:47.056 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NtzMQZE20RksEuKs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14285/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14285/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:47.056 [print] {
"resourceType": "Observation",
"id": "14285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:51.724+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
> *
print COOKIES
09:52:47.056 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:47.056 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"551"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:47.056 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NtzMQZE20RksEuKs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14285/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14285/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:47.056 [print] {
"resourceType": "Observation",
"id": "14285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:51.724+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
> *
print COOKIES
09:52:47.056 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:47.898 [print] {
"resourceType": "Observation",
"id": "14285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:51.724+02:00",
"source": "#NtzMQZE20RksEuKs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:48.513 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:49.163 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:53.191+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:53.191+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:49.164 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "83",
"display": "(c.1) Malignant gonadal germinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:49.787 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:49.787 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z1zmvCOCYZSL1hSd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14286/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14286/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:49.787 [print] {
"resourceType": "Observation",
"id": "14286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:54.458+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "83",
"display": "(c.1) Malignant gonadal germinomas"
}
]
}
}
> *
print COOKIES
09:52:49.787 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:49.789 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:49.789 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z1zmvCOCYZSL1hSd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14286/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14286/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:49.789 [print] {
"resourceType": "Observation",
"id": "14286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:54.458+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "83",
"display": "(c.1) Malignant gonadal germinomas"
}
]
}
}
> *
print COOKIES
09:52:49.789 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:50.415 [print] {
"resourceType": "Observation",
"id": "14286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:54.458+02:00",
"source": "#Z1zmvCOCYZSL1hSd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "83",
"display": "(c.1) Malignant gonadal germinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:51.119 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:51.740 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:55.786+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:55.786+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:51.755 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "84",
"display": "(c.2) Malignant gonadal teratomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:52.361 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:52.361 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oH0NMBi69PxXh408"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14287/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14287/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:52.361 [print] {
"resourceType": "Observation",
"id": "14287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:57.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "84",
"display": "(c.2) Malignant gonadal teratomas"
}
]
}
}
> *
print COOKIES
09:52:52.361 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:52.361 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:52.361 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oH0NMBi69PxXh408"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14287/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14287/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:52.361 [print] {
"resourceType": "Observation",
"id": "14287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:57.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "84",
"display": "(c.2) Malignant gonadal teratomas"
}
]
}
}
> *
print COOKIES
09:52:52.361 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:53.030 [print] {
"resourceType": "Observation",
"id": "14287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:57.031+02:00",
"source": "#oH0NMBi69PxXh408",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "84",
"display": "(c.2) Malignant gonadal teratomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:53.641 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:54.242 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:52:58.317+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:52:58.317+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:54.243 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "94",
"display": "(c) Nasopharyngeal carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:54.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:54.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jaNsu5Ci3EPbgMz6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14288/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14288/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:54.856 [print] {
"resourceType": "Observation",
"id": "14288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:59.495+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "94",
"display": "(c) Nasopharyngeal carcinomas"
}
]
}
}
> *
print COOKIES
09:52:54.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:54.858 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:54.858 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jaNsu5Ci3EPbgMz6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14288/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:52:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14288/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:52:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:54.858 [print] {
"resourceType": "Observation",
"id": "14288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:59.495+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "94",
"display": "(c) Nasopharyngeal carcinomas"
}
]
}
}
> *
print COOKIES
09:52:54.858 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:55.429 [print] {
"resourceType": "Observation",
"id": "14288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:52:59.495+02:00",
"source": "#jaNsu5Ci3EPbgMz6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "94",
"display": "(c) Nasopharyngeal carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:56.088 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 19ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 19ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:56.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:00.739+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:00.739+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:56.727 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-07-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:57.376 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:57.376 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zU8O6eDTSgRXNadJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14289/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14289/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:57.376 [print] {
"resourceType": "Observation",
"id": "14289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:02.035+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-07-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
> *
print COOKIES
09:52:57.376 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:52:57.376 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:52:57.376 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zU8O6eDTSgRXNadJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14289/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14289/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:52:57.376 [print] {
"resourceType": "Observation",
"id": "14289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:02.035+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-07-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
> *
print COOKIES
09:52:57.376 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:52:57.993 [print] {
"resourceType": "Observation",
"id": "14289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:02.035+02:00",
"source": "#zU8O6eDTSgRXNadJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-07-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:52:58.802 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:52:59.433 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:03.490+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:03.490+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:52:59.433 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:00.013 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:00.013 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Tzs6frQOvwBHI3AF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14290/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14290/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:00.013 [print] {
"resourceType": "Observation",
"id": "14290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:04.688+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
> *
print COOKIES
09:53:00.013 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:00.028 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:00.028 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Tzs6frQOvwBHI3AF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14290/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14290/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:00.028 [print] {
"resourceType": "Observation",
"id": "14290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:04.688+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
> *
print COOKIES
09:53:00.028 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:00.640 [print] {
"resourceType": "Observation",
"id": "14290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:04.688+02:00",
"source": "#Tzs6frQOvwBHI3AF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:01.242 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:01.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:05.920+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:05.920+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:01.875 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "101",
"display": "(f.5) Carcinomas of thymus"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:02.477 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:02.477 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"s0JBJpOvsalOLatf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14291/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14291/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:02.477 [print] {
"resourceType": "Observation",
"id": "14291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:07.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "101",
"display": "(f.5) Carcinomas of thymus"
}
]
}
}
> *
print COOKIES
09:53:02.477 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:02.477 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:02.477 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"s0JBJpOvsalOLatf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14291/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14291/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:02.477 [print] {
"resourceType": "Observation",
"id": "14291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:07.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "101",
"display": "(f.5) Carcinomas of thymus"
}
]
}
}
> *
print COOKIES
09:53:02.477 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:03.126 [print] {
"resourceType": "Observation",
"id": "14291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:07.136+02:00",
"source": "#s0JBJpOvsalOLatf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "101",
"display": "(f.5) Carcinomas of thymus"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:03.750 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:04.336 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:08.421+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:08.421+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:04.336 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "99",
"display": "(f.3) Carcinomas of appendix"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:05.041 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:05.041 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EAnRunCkhXRsOrOt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14292/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14292/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:05.041 [print] {
"resourceType": "Observation",
"id": "14292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:09.689+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "99",
"display": "(f.3) Carcinomas of appendix"
}
]
}
}
> *
print COOKIES
09:53:05.041 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:05.041 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:05.041 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EAnRunCkhXRsOrOt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14292/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14292/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:05.041 [print] {
"resourceType": "Observation",
"id": "14292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:09.689+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "99",
"display": "(f.3) Carcinomas of appendix"
}
]
}
}
> *
print COOKIES
09:53:05.041 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:06.048 [print] {
"resourceType": "Observation",
"id": "14292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:09.689+02:00",
"source": "#EAnRunCkhXRsOrOt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "99",
"display": "(f.3) Carcinomas of appendix"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:06.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:07.268 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:11.349+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:11.349+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:07.284 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "81",
"display": "(b.5) Choriocarcinomas of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:07.883 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"570"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:07.883 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PPej5Cg3GcbR8ZQ8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14293/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14293/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:07.883 [print] {
"resourceType": "Observation",
"id": "14293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:12.539+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "81",
"display": "(b.5) Choriocarcinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:53:07.883 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:07.885 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"570"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:07.885 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PPej5Cg3GcbR8ZQ8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14293/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14293/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:07.885 [print] {
"resourceType": "Observation",
"id": "14293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:12.539+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "81",
"display": "(b.5) Choriocarcinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:53:07.885 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:08.471 [print] {
"resourceType": "Observation",
"id": "14293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:12.539+02:00",
"source": "#PPej5Cg3GcbR8ZQ8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "81",
"display": "(b.5) Choriocarcinomas of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:09.088 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:09.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:13.764+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:13.764+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:09.682 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "104",
"display": "(f.8) Carcinomas of bladder"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:11.557 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:11.557 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m54UyoX9dkoVQ5BH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14294/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14294/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:11.557 [print] {
"resourceType": "Observation",
"id": "14294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:16.223+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "104",
"display": "(f.8) Carcinomas of bladder"
}
]
}
}
> *
print COOKIES
09:53:11.557 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:11.557 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:11.557 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m54UyoX9dkoVQ5BH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14294/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14294/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:11.557 [print] {
"resourceType": "Observation",
"id": "14294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:16.223+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "104",
"display": "(f.8) Carcinomas of bladder"
}
]
}
}
> *
print COOKIES
09:53:11.557 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:12.396 [print] {
"resourceType": "Observation",
"id": "14294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:16.223+02:00",
"source": "#m54UyoX9dkoVQ5BH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "104",
"display": "(f.8) Carcinomas of bladder"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:13.064 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:13.635 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:17.750+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:17.750+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:13.650 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:14.300 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:14.300 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ixXOPtfpne7OIXRS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14295/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14295/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:14.300 [print] {
"resourceType": "Observation",
"id": "14295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:18.938+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
> *
print COOKIES
09:53:14.300 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:14.302 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:14.302 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ixXOPtfpne7OIXRS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14295/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14295/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:14.302 [print] {
"resourceType": "Observation",
"id": "14295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:18.938+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
> *
print COOKIES
09:53:14.302 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:14.905 [print] {
"resourceType": "Observation",
"id": "14295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:18.938+02:00",
"source": "#ixXOPtfpne7OIXRS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:15.542 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:16.156 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:20.213+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:20.213+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:16.156 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:16.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:16.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9ctIrvqzcYzFDqix"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14296/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14296/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:16.779 [print] {
"resourceType": "Observation",
"id": "14296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:21.424+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
> *
print COOKIES
09:53:16.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:16.781 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:16.782 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9ctIrvqzcYzFDqix"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14296/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14296/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:16.782 [print] {
"resourceType": "Observation",
"id": "14296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:21.424+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
> *
print COOKIES
09:53:16.782 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:17.353 [print] {
"resourceType": "Observation",
"id": "14296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:21.424+02:00",
"source": "#9ctIrvqzcYzFDqix",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:18.000 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:18.567 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:22.674+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:22.674+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:18.569 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:20.193 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:20.193 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5s4O43eTC4aEJk8c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14297/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14297/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:20.193 [print] {
"resourceType": "Observation",
"id": "14297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:24.835+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
> *
print COOKIES
09:53:20.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:20.208 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:20.208 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5s4O43eTC4aEJk8c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14297/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14297/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:20.208 [print] {
"resourceType": "Observation",
"id": "14297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:24.835+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
> *
print COOKIES
09:53:20.208 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:20.825 [print] {
"resourceType": "Observation",
"id": "14297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:24.835+02:00",
"source": "#5s4O43eTC4aEJk8c",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:21.427 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:22.060 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:26.100+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:26.100+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:22.062 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:23.126 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:23.126 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tOUNjJp3iYd6nPnL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14298/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14298/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:23.126 [print] {
"resourceType": "Observation",
"id": "14298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:27.781+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
> *
print COOKIES
09:53:23.126 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:23.126 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:23.126 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tOUNjJp3iYd6nPnL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14298/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14298/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:23.126 [print] {
"resourceType": "Observation",
"id": "14298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:27.781+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
> *
print COOKIES
09:53:23.126 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:24.773 [print] {
"resourceType": "Observation",
"id": "14298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:27.781+02:00",
"source": "#tOUNjJp3iYd6nPnL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:25.383 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 24ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 24ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:25.995 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:30.039+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:30.039+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:26.011 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:26.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:26.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2MZKzDhdqUtE6DvX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14299/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14299/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:26.620 [print] {
"resourceType": "Observation",
"id": "14299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:31.296+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
> *
print COOKIES
09:53:26.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:26.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:26.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2MZKzDhdqUtE6DvX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14299/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14299/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:26.620 [print] {
"resourceType": "Observation",
"id": "14299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:31.296+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
> *
print COOKIES
09:53:26.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:27.227 [print] {
"resourceType": "Observation",
"id": "14299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:31.296+02:00",
"source": "#2MZKzDhdqUtE6DvX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:27.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:28.462 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:32.541+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:32.541+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:28.462 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:29.040 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:29.040 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QoOeeD3k30ZFJ8Bx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14300/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14300/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:29.040 [print] {
"resourceType": "Observation",
"id": "14300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:33.707+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
09:53:29.040 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:29.042 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:29.042 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QoOeeD3k30ZFJ8Bx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14300/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14300/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:29.042 [print] {
"resourceType": "Observation",
"id": "14300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:33.707+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
09:53:29.042 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:29.633 [print] {
"resourceType": "Observation",
"id": "14300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:33.707+02:00",
"source": "#QoOeeD3k30ZFJ8Bx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:30.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:30.877 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:34.940+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:34.940+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:30.877 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "95",
"display": "(d) Malignant melanomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:31.526 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:31.526 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fwK0Qg5OPLi0fAGm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14301/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14301/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:31.526 [print] {
"resourceType": "Observation",
"id": "14301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:36.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "95",
"display": "(d) Malignant melanomas"
}
]
}
}
> *
print COOKIES
09:53:31.526 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:31.526 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:31.526 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fwK0Qg5OPLi0fAGm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14301/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14301/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:31.526 [print] {
"resourceType": "Observation",
"id": "14301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:36.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "95",
"display": "(d) Malignant melanomas"
}
]
}
}
> *
print COOKIES
09:53:31.526 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:32.946 [print] {
"resourceType": "Observation",
"id": "14301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:36.153+02:00",
"source": "#fwK0Qg5OPLi0fAGm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "95",
"display": "(d) Malignant melanomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:33.578 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 21ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 21ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:34.142 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:38.231+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:38.231+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:34.150 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:34.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:34.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5CQajISbu785DZfa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14302/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14302/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:34.775 [print] {
"resourceType": "Observation",
"id": "14302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:39.452+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
> *
print COOKIES
09:53:34.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:34.776 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:34.776 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5CQajISbu785DZfa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14302/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14302/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:34.776 [print] {
"resourceType": "Observation",
"id": "14302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:39.452+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
> *
print COOKIES
09:53:34.776 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:35.405 [print] {
"resourceType": "Observation",
"id": "14302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:39.452+02:00",
"source": "#5CQajISbu785DZfa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:36.043 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:36.634 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:40.716+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:40.716+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:36.636 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "90",
"display": "(d) Gonadal carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:37.308 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:37.309 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D2cdaTue8IKJAP6Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14303/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14303/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:37.309 [print] {
"resourceType": "Observation",
"id": "14303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:41.961+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "90",
"display": "(d) Gonadal carcinomas"
}
]
}
}
> *
print COOKIES
09:53:37.309 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:37.311 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:37.311 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D2cdaTue8IKJAP6Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14303/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14303/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:37.311 [print] {
"resourceType": "Observation",
"id": "14303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:41.961+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "90",
"display": "(d) Gonadal carcinomas"
}
]
}
}
> *
print COOKIES
09:53:37.311 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:37.954 [print] {
"resourceType": "Observation",
"id": "14303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:41.961+02:00",
"source": "#D2cdaTue8IKJAP6Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "90",
"display": "(d) Gonadal carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:38.580 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:39.460 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:43.260+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:43.260+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:39.460 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "71",
"display": "(a.1) Intracranial and intraspinal germinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:40.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:40.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJnP1El6HzGczKWv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14304/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14304/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:40.155 [print] {
"resourceType": "Observation",
"id": "14304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:44.782+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "71",
"display": "(a.1) Intracranial and intraspinal germinomas"
}
]
}
}
> *
print COOKIES
09:53:40.155 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:40.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:40.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJnP1El6HzGczKWv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14304/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14304/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:40.155 [print] {
"resourceType": "Observation",
"id": "14304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:44.782+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "71",
"display": "(a.1) Intracranial and intraspinal germinomas"
}
]
}
}
> *
print COOKIES
09:53:40.155 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:40.740 [print] {
"resourceType": "Observation",
"id": "14304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:44.782+02:00",
"source": "#KJnP1El6HzGczKWv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "71",
"display": "(a.1) Intracranial and intraspinal germinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:41.636 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:42.259 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:46.307+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:46.307+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:42.260 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "89",
"display": "(c.7) Malignant gonadal gonadoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:42.872 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:42.872 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GcMCozhMgsUpdTZb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14305/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14305/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:42.872 [print] {
"resourceType": "Observation",
"id": "14305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:47.511+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "89",
"display": "(c.7) Malignant gonadal gonadoblastoma"
}
]
}
}
> *
print COOKIES
09:53:42.872 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:42.872 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:42.872 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GcMCozhMgsUpdTZb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14305/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14305/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:42.872 [print] {
"resourceType": "Observation",
"id": "14305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:47.511+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "89",
"display": "(c.7) Malignant gonadal gonadoblastoma"
}
]
}
}
> *
print COOKIES
09:53:42.872 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:43.501 [print] {
"resourceType": "Observation",
"id": "14305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:47.511+02:00",
"source": "#GcMCozhMgsUpdTZb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "89",
"display": "(c.7) Malignant gonadal gonadoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:44.117 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:44.688 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:48.790+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:48.790+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:44.689 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "93",
"display": "(b) Thyroid carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:45.320 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:45.320 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oZTfuUhXv8pTt5mW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14306/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14306/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:45.320 [print] {
"resourceType": "Observation",
"id": "14306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:49.994+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "93",
"display": "(b) Thyroid carcinomas"
}
]
}
}
> *
print COOKIES
09:53:45.320 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:45.322 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:45.322 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oZTfuUhXv8pTt5mW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14306/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14306/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:45.322 [print] {
"resourceType": "Observation",
"id": "14306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:49.994+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "93",
"display": "(b) Thyroid carcinomas"
}
]
}
}
> *
print COOKIES
09:53:45.322 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:45.986 [print] {
"resourceType": "Observation",
"id": "14306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:49.994+02:00",
"source": "#oZTfuUhXv8pTt5mW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "93",
"display": "(b) Thyroid carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:46.643 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:47.476 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:51.293+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:51.293+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:47.476 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "73",
"display": "(a.3) Intracranial and intraspinal embryonal carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:48.104 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:48.105 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mubDaUwj78rjZATM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14307/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14307/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:48.105 [print] {
"resourceType": "Observation",
"id": "14307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:52.769+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "73",
"display": "(a.3) Intracranial and intraspinal embryonal carcinomas"
}
]
}
}
> *
print COOKIES
09:53:48.105 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:48.107 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:48.107 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mubDaUwj78rjZATM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14307/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14307/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:48.107 [print] {
"resourceType": "Observation",
"id": "14307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:52.769+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "73",
"display": "(a.3) Intracranial and intraspinal embryonal carcinomas"
}
]
}
}
> *
print COOKIES
09:53:48.107 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:48.659 [print] {
"resourceType": "Observation",
"id": "14307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:52.769+02:00",
"source": "#mubDaUwj78rjZATM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "73",
"display": "(a.3) Intracranial and intraspinal embryonal carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:49.307 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:49.870 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:53.976+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:53.976+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:49.871 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-03-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:50.452 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:50.452 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"86WeqiXNG0iqX2YF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14308/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14308/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:50.452 [print] {
"resourceType": "Observation",
"id": "14308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:55.127+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-03-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
> *
print COOKIES
09:53:50.452 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:50.455 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:50.455 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"86WeqiXNG0iqX2YF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14308/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14308/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:50.455 [print] {
"resourceType": "Observation",
"id": "14308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:55.127+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-03-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
> *
print COOKIES
09:53:50.455 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:51.064 [print] {
"resourceType": "Observation",
"id": "14308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:55.127+02:00",
"source": "#86WeqiXNG0iqX2YF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-03-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:51.677 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:52.311 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:56.331+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:56.331+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:52.312 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:52.938 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:52.938 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ajJfO8EiOoLcZuVD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14309/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14309/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:52.938 [print] {
"resourceType": "Observation",
"id": "14309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:57.605+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
> *
print COOKIES
09:53:52.938 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:52.941 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:52.941 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ajJfO8EiOoLcZuVD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14309/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14309/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:52.941 [print] {
"resourceType": "Observation",
"id": "14309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:57.605+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
> *
print COOKIES
09:53:52.941 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:53.509 [print] {
"resourceType": "Observation",
"id": "14309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:57.605+02:00",
"source": "#ajJfO8EiOoLcZuVD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:54.076 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:54.710 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:53:58.760+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:53:58.760+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:54.710 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:55.302 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:55.302 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xoaFysmolZkA9ZGj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14310/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14310/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:55.302 [print] {
"resourceType": "Observation",
"id": "14310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:59.976+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
> *
print COOKIES
09:53:55.302 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:55.304 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:55.304 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xoaFysmolZkA9ZGj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14310/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:53:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14310/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:53:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:55.304 [print] {
"resourceType": "Observation",
"id": "14310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:59.976+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
> *
print COOKIES
09:53:55.304 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:55.945 [print] {
"resourceType": "Observation",
"id": "14310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:53:59.976+02:00",
"source": "#xoaFysmolZkA9ZGj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:56.603 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:57.208 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:54:01.263+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:54:01.263+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:57.208 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:57.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:57.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3b5DDgxfyoA40mKV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14311/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14311/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:57.856 [print] {
"resourceType": "Observation",
"id": "14311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:02.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
> *
print COOKIES
09:53:57.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:53:57.857 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:53:57.857 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3b5DDgxfyoA40mKV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14311/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14311/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:53:57.858 [print] {
"resourceType": "Observation",
"id": "14311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:02.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
> *
print COOKIES
09:53:57.858 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:53:58.432 [print] {
"resourceType": "Observation",
"id": "14311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:02.517+02:00",
"source": "#3b5DDgxfyoA40mKV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:53:59.053 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 20ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 20ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:53:59.671 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:54:03.723+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:54:03.723+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:53:59.671 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "75",
"display": "(a.5) Intracranial and intraspinal choriocarcinoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:54:00.277 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"559"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:54:00.277 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"94z9SUwL7PjNsZ6D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14312/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14312/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:54:00.277 [print] {
"resourceType": "Observation",
"id": "14312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:04.939+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "75",
"display": "(a.5) Intracranial and intraspinal choriocarcinoma"
}
]
}
}
> *
print COOKIES
09:54:00.277 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:54:00.277 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"559"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:54:00.277 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"94z9SUwL7PjNsZ6D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14312/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14312/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:54:00.277 [print] {
"resourceType": "Observation",
"id": "14312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:04.939+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "75",
"display": "(a.5) Intracranial and intraspinal choriocarcinoma"
}
]
}
}
> *
print COOKIES
09:54:00.277 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:54:00.894 [print] {
"resourceType": "Observation",
"id": "14312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:04.939+02:00",
"source": "#94z9SUwL7PjNsZ6D",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "75",
"display": "(a.5) Intracranial and intraspinal choriocarcinoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:54:01.552 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:54:02.159 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:54:06.225+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:54:06.225+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:54:02.159 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "110",
"display": "(a.3) Pulmonary blastoma and pleuropulmonary blastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:54:02.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:54:02.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VGVu06vHFfeIhuMG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14313/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14313/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:54:02.741 [print] {
"resourceType": "Observation",
"id": "14313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:07.420+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "110",
"display": "(a.3) Pulmonary blastoma and pleuropulmonary blastoma"
}
]
}
}
> *
print COOKIES
09:54:02.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:54:02.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:54:02.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VGVu06vHFfeIhuMG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14313/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14313/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:54:02.741 [print] {
"resourceType": "Observation",
"id": "14313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:07.420+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "110",
"display": "(a.3) Pulmonary blastoma and pleuropulmonary blastoma"
}
]
}
}
> *
print COOKIES
09:54:02.756 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:54:03.385 [print] {
"resourceType": "Observation",
"id": "14313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:07.420+02:00",
"source": "#VGVu06vHFfeIhuMG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "110",
"display": "(a.3) Pulmonary blastoma and pleuropulmonary blastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:54:04.014 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:54:04.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:54:08.681+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:54:08.681+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:54:04.884 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:54:05.706 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:54:05.706 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K3bRJc6nb57fhfaG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14314/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14314/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:54:05.706 [print] {
"resourceType": "Observation",
"id": "14314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:10.380+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
> *
print COOKIES
09:54:05.706 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:54:05.708 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:54:05.708 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K3bRJc6nb57fhfaG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14314/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14314/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:54:05.708 [print] {
"resourceType": "Observation",
"id": "14314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:10.380+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
> *
print COOKIES
09:54:05.708 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:54:06.285 [print] {
"resourceType": "Observation",
"id": "14314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:10.380+02:00",
"source": "#K3bRJc6nb57fhfaG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:54:06.905 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:54:07.559 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:54:11.575+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:54:11.575+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:54:07.575 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:54:08.192 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"555"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:54:08.192 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"90TqCDe5I3Lz42BM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14315/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14315/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:54:08.192 [print] {
"resourceType": "Observation",
"id": "14315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:12.877+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
> *
print COOKIES
09:54:08.192 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:54:08.192 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"555"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:54:08.192 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"90TqCDe5I3Lz42BM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14315/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14315/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:54:08.192 [print] {
"resourceType": "Observation",
"id": "14315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:12.877+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
> *
print COOKIES
09:54:08.192 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:54:08.776 [print] {
"resourceType": "Observation",
"id": "14315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:12.877+02:00",
"source": "#90TqCDe5I3Lz42BM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:54:09.622 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:54:10.244 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:54:14.079+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:54:14.079+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:54:10.245 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "107",
"display": "(f.11) Carcinomas of unspecified site"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:54:10.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:54:10.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FvtIrM3DWN2o1EZb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14316/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14316/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:54:10.831 [print] {
"resourceType": "Observation",
"id": "14316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:15.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "107",
"display": "(f.11) Carcinomas of unspecified site"
}
]
}
}
> *
print COOKIES
09:54:10.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:54:10.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:54:10.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FvtIrM3DWN2o1EZb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14316/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:54:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/14316/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:54:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:54:10.831 [print] {
"resourceType": "Observation",
"id": "14316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:15.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "107",
"display": "(f.11) Carcinomas of unspecified site"
}
]
}
}
> *
print COOKIES
09:54:10.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:54:11.392 [print] {
"resourceType": "Observation",
"id": "14316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:54:15.505+02:00",
"source": "#FvtIrM3DWN2o1EZb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "107",
"display": "(f.11) Carcinomas of unspecified site"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:54:11.971 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:54:12.583 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:54:16.644+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:54:16.644+02:00"
}
]
}